iam trying to over write a file in the yii web app the code is in the view file and i want to over write the a file inside the protected/config folder can u suggest me how to fopen ($file,'w');
I following is the code which i used
$my_file = '..\..\config\main2.php';
$file=fopen("..\..\config\main2.php","w");
fwrite($file, $str1.$str3.$str8.$str5.$str7);
the following error was thrown for m e
fopen(../../config/main.php) [function.fopen]: failed to open stream: No such file or directory
please can any one suggest how to use the the fopen in the yii webapp