0
php.ini
有什麼具體的設置,我需要改變以允許服務器包含文件?我在我的php應用程序中包含一個phar文件(goutte.phar)。當我嘗試點擊網址時,我得到連接到服務器被重置錯誤
require_once dirname(dirname(__FILE__)).'/unleashapi/protected/extensions/goutte.phar';
php.ini
有什麼具體的設置,我需要改變以允許服務器包含文件?我在我的php應用程序中包含一個phar文件(goutte.phar)。當我嘗試點擊網址時,我得到連接到服務器被重置錯誤
require_once dirname(dirname(__FILE__)).'/unleashapi/protected/extensions/goutte.phar';
可以在php.ini
auto_prepend_file
設置:
auto_prepend_file="/custom/path/unleashapi/protected/extensions/goutte.phar"
確保Apache訪問該文件。
如果服務器使用(通常是Debian和所有基於Debian的發行版),你應該添加:suhosin.executor.include.whitelist="phar"
到php.ini
感謝您的回答,但仍然沒有工作的伴侶。相同的代碼在另一臺機器上工作。我相信我在php.ini中缺少一些設置,但無法理解。 –