这是什么意思 “(include_path='.:/usr/share/pear:/usr/share/php')“?问题的解决方案
2022-08-30 18:32:02
我在EC2上有文件结构,如:但面临一些文件引用问题。
index.php
-db
-config.php
-cron
-cron1.php
我尝试过文件引用:
`require_once (dirname(__FILE__).'/db/config.php');`
`require_once (($_SERVER['DOCUMENT_ROOT']).'/db/config.php');`
但cron没有 run.it 在邮件中给出错误
`PHP Warning: require_once(/db/config.php): failed to open stream: No such file or directory in /var/www/html/cron/cron1.php on line 3
Warning: require_once(/db/config.php): failed to open stream: No such file or directory in /var/www/html/cron/cron1.php on line 3
PHP Fatal error: require_once(): Failed opening required '/db/config.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/cron/cron1.php on line 3
Fatal error: require_once(): Failed opening required '/db/config.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/cron/cron1.php on line 3`