My code requires creating a new file and writing a string to this file.
My code goes like :
$o=fopen("$pg_name","w");
fputs($o,$content);
fclose($o);
The variable $pg_name comes from the previous page where the admin is gonna put the name.
When i execute this code it gives me an error as :
Warning: fopen("shilpa.php","w") - Permission denied in /home/my_site_name/www/edit1.php on line 23
Now from the reference that I did , I understood that fopen when used with "w" parameter opens the file in write mode and above all tries to create one if the file is not existing. Though my error says "permission denied" , it is not even able to create the specified file.
Can someone help me ?
Thanks in Advance.