php /home/test9/public_html/degerlendir/test-4567.php "var1=18&var2=22"
我需要使用cron作業在後臺運行一個頁面。我在上面用命令測試了我的代碼。但是,我得到這個錯誤:require_once在命令行中不起作用
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」)。我無法讓它工作。