I am running Ubuntu version 14.04, and I have an apache2 server set up to host some php files on localhost that are stored in
When I try to execute the following code in one of my php script
<?php $file = fopen("test.txt","w"); fwrite($file,"Hello World. Testing!"); fclose($file); ?>
I do not find a file stored in my /var/www/html named test.txt, or anywhere on my computer after searching. The file name does not already exist, and I am using
sudo nautilus because I do not have the necessary permissions to edit the php files inside the
/var/www/html. Why are the files not appearing in my
/var/www/html folder and how can I fix this so that the file is created?