-rw-r--r-- 1 root root 514 Jan 15 04:03 curl.php
-rw-r----- 1 root root 1344 Feb 5 02:09 dbm-config.ini
-rw-r--r-- 1 root root 5149 Feb 5 02:19 mysql-connectivity-status.php
这里访问URL从一个文件,上午访问来自URL文件“mysql的连接性,status.php”像http://<ip>/html/DB-Monitoring/mysql-connectivity-status.php
。如何使用curl
在mysql-connectivity-status.php
我打电话给文件dbm-config.ini
。通过URL访问时,我得到以下警告。
Warning: parse_ini_file(/var/www/html/DB-Monitoring/dbm-config.ini): failed to open stream: Permission denied in /var/www/html/DB-Monitoring/mysql-connectivity-status.php on line 113
所以,我不想更改dbm-config.ini
许可但如何我访问使用URL文件?
您碰巧知道您是否在服务器上运行SuPHP或PHPExec?你应该能够通过phpinfo()找到。我可能只是将文件的权限更改为644,然后通过htaccess阻止对文件的直接访问,以便PHP仍可以访问它。 [这可能有所帮助](http://stackoverflow.com/questions/1340001/deny-direct-access-to-all-php-files-except-index-php) – djthoms