I am trying to create a simple text file on my server using PHP.
I have given 777
permission to the folder still I am unable to create the file it gives following error:
Warning: fopen(demo.txt): failed to open stream: No such file or directory in /var/www/code/fcreate.php on line 6 unable to create
The PHP code is as follows:
<?php
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(-1);
fopen('demo.txt','r') or die('unable to create');
?>