【发布时间】:2018-01-23 09:10:16
【问题描述】:
php /home/test9/public_html/degerlendir/test-4567.php "var1=18&var2=22"
我需要使用 cron 作业在后台运行一页。我用上面的命令测试了我的代码。但我得到这个错误:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/extensions/no-debug-non-zts-20100525/imagick.so' - /usr/lib64/extensions/no-debug-non-zts-20100525/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: require_once(../config.php): failed to open stream: No such file or directory in /home/test9/public_html/degerlendir/test-4567.php on line 2
PHP Fatal error: require_once(): Failed opening required '../config.php' (include_path='.:/usr/lib64/php') in /home/test9/public_html/degerlendir/test-4567.php on line 2
问题是页面在父目录中不包含 config.php。该页面在浏览器中正常工作。我尝试使用不同的 require_once 变体,例如 require_once ($_SERVER['DOCUMENT_ROOT']."/config.php")。我无法让它工作。
【问题讨论】:
标签: php centos fatal-error require-once