問題描述
我已將本地主機文件上傳到我的網站,但它顯示此錯誤:-
I have uploaded my localhost files to my website but it is showing me this error:-
: [2] file_put_contents( ***WebsiteURL*** /cache/lang/ ***FileName*** .php)
[function.file-put-contents]: failed to open stream: HTTP wrapper does
not support writeable connections | LINE: 127 | FILE: /home/content/
***FoldersFileName*** .php
我個人認為內容保存在緩存文件夾中的文件中,當我將文件上傳到我的網絡服務器時,它試圖訪問緩存的本地主機文件夾.
What i personally feel that the contents get saved in a file in cache folder and when i uploaded the files to my web server it is trying to access the cached localhost folder.
推薦答案
你需要使用服務器路徑來代替 file_put_contents(***WebSiteURL***...)
>/cache/lang/file.php(例如/home/content/site/folders/filename.php
).
Instead of doing file_put_contents(***WebSiteURL***...)
you need to use the server path to /cache/lang/file.php
(e.g. /home/content/site/folders/filename.php
).
您不能通過 HTTP
打開文件并期望它被寫入.相反,您需要使用本地路徑打開它.
You cannot open a file over HTTP
and expect it to be written. Instead you need to open it using the local path.
這篇關于無法打開流:HTTP 包裝器不支持可寫連接的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!