Top "File-put-contents" questions

`file_put_contents()` is a PHP function which writes a string to a file.

Write JSON data to text file with PHP

Problem: I have a script that send JSON data to a PHP file in this way: var xmlhttp = new XMLHttpRequest(); …

php json text-files file-put-contents
file_put_contents() expects parameter 1 to be a valid path, string given

I have the following simple script (stripped down): define("LANG_DIR", "../../app/lang/"); // define("LANG_DIR", "/var/www/html/app/…

php path relative-path file-put-contents
How can I load a remote file using file_get_contents()?

Scratching my head a bit now with this. I am trying to get a file from a remote url. I …

php file-get-contents file-put-contents
file_put_contents not working

I try to upload something to my ubuntu server by file_put_contents (a converted base64-string as .jpg) with …

php ubuntu file-put-contents