Answers for "file put content"

PHP
0

php append line to file

file_put_contents("filename.txt","new line to appended\n",FILE_APPEND);
Posted by: Guest on March-04-2021
1

php file put content

<?php
$data = ["[email protected]" => ["more" => ["yes" => "More"]]];

$inp = file_get_contents('results.json');
$tempArray = json_decode($inp);
array_push($tempArray, $data);
$jsonData = json_encode($tempArray);
file_put_contents('results.json', $jsonData);
Posted by: Guest on January-13-2021
4

php file_put_contents

file_put_contents ($filename, $data, $flags = 0, $context = null): int
Posted by: Guest on June-11-2020

Browse Popular Code Answers by Language