Skip to content
Advertisement

failed to open stream: HTTP wrapper does not support writeable connections

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.

Advertisement

Answer

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).

You cannot open a file over HTTP and expect it to be written. Instead you need to open it using the local path.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement