The php Physical Function fopen () on w3c is prompted by w3c body, but I still don't know how to get the permission. "If you try to run this code, an error occurs, check whether you have the permission to access the PHP file that writes information to the hard disk." PHPWarning: fopen(testfile.txt):... the physical function fopen () of php on w3c ();
This is a message from w3c, but I still don't know how to get the permission. "if an error occurs when you try to run this code, check whether you have the PHP file access permission to write information to the hard disk ."
PHP Warning: fopen(testfile.txt): failed to open stream: Permission denied in C: \ inetpub \ wwwroot \ fopen_tester.php on line 11
Reply content:
Learning the w3c php Physical Function fopen ();
This is a message from w3c, but I still don't know how to get the permission. "if an error occurs when you try to run this code, check whether you have the PHP file access permission to write information to the hard disk ."
PHP Warning: fopen(testfile.txt): failed to open stream: Permission denied in C: \ inetpub \ wwwroot \ fopen_tester.php on line 11
You do not have the w permission on this directory.
It has nothing to do with the editor. You need to specify the IIS permission to access the directory. If you want PHP to create files at will, it is surprising that once your permissions are cracked, hacker will be able to create files at will.
$fp = @fopen($test_file, 'wb');if ($fp === false){ return $mark; }
- Ls-la
- Ps-ef | grep webServer
- Then give the web server write permission to a specific directory
Check whether the apache user has the permission to operate the directory.
Try this? Online debugging http://phpedia.net/8ouhug5k
You can directly copy the w3c code without configuring the local environment.
If you want to debug the folder locally, check whether the folder is in read-only mode? Right-click to select read/write. If not, check the settings in IIS to check whether data can be written.
Run your PHP program as an administrator