如果打開訪問但仍然出現php錯誤,該怎麼辦?allow_url_fopen處於打開狀態,仍然無法獲取數據
Warning: file_get_contents() [function.file-get-contents]: http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in ------------- on line 40
Warning: file_get_contents(http://finance.google.co.uk/finance/info?client=ig&q=NASDAQ:MSFT) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in --------------- on line 40
你通過命令行或在瀏覽器中使用PHP設置
allow_url_fopen=on
?兩者都有不同的配置。 – acme我沒有使用命令行。 –
用'<?php phpinfo()創建一個文件; '>',在瀏覽器中打開它,並檢查哪些php.ini文件被解析。您可能正在編輯錯誤的。 – pduersteler