簡體   English   中英

Wordpress中的PHP錯誤“ file_get_contents和需要授權”

[英]PHP Error “file_get_contents & Authorization Required” in Wordpress

我的一個wordpress插件有問題。 當我激活它時,此消息顯示在屏幕頂部。

Warning: file_get_contents(http://gruender-news24.de/wp-content/plugins/ultproteam_/includes/../css/font-awesome.css): failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Required in /mnt/web7/e3/69/5941469/htdocs/WordPress_08/wp-content/plugins/ultproteam_/includes/plugin-class.php on line 336

這段代碼在第336行。

$pTsubject = file_get_contents( $this->mainPath . '/css/font-awesome.css');

我不是很熟悉php,我自己也無法搞清楚。 這似乎提供了一個解決方案,但是我無法針對我的特殊問題對其進行“轉換”。

http://www.hashbangcode.com/blog/using-authentication-and-filegetcontents

非常感謝你的幫助!

file_get_contents()使用fopen()包裝器,因此它被限制通過php.ini中的allow_url_fopen選項訪問URL。

要么

嘗試使用CURL。

這里似乎是一個重復問題的答案很多。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM