无法打开流:HTTP 包装器不支持可写连接

failed to open stream: HTTP wrapper does not support writeable connections(无法打开流:HTTP 包装器不支持可写连接)
本文介绍了无法打开流:HTTP 包装器不支持可写连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我已将本地主机文件上传到我的网站,但它显示此错误:-

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 包装器不支持可写连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

In PHP how can you clear a WSDL cache?(在 PHP 中如何清除 WSDL 缓存?)
Stop caching for PHP 5.5.3 in MAMP(在 MAMP 中停止缓存 PHP 5.5.3)
Caching HTTP responses when they are dynamically created by PHP(缓存由 PHP 动态创建的 HTTP 响应)
Memcached vs APC which one should I choose?(Memcached 与 APC 我应该选择哪一个?)
What is causing quot;Unable to allocate memory for poolquot; in PHP?(是什么导致“无法为池分配内存?在 PHP 中?)
How to clear browser cache with php?(如何用php清除浏览器缓存?)