php script without permission on root document

2

I would like to create a log with page visitor information, but the script is not writable.

How to proceed?

  

PHP Warning: fopen (log.txt): failed to open stream: Permiss \ xc3 \ xa3o   denied in /var/www/html/index.php on line 30

    
asked by anonymous 27.02.2015 / 23:30

1 answer

1

You may need to change the access permissions. Open a terminal and navigate to the location where the file is located, and type:

sudo chmod 777 log.txt

This will allow you full access to this file. For more information on the use of chmod you can view here .

    
28.02.2015 / 00:25