write_file
write_file($file,$content,$timeout=COMMAND_TIME,$create_folders=false); - write a file with the specified content
The function accepts parameters as input:
$file – path to the file to write. It can be either absolute or relative (relative to the script folder).
$content – the contents of the file to write.
$create_folders - create a file folder (true) if there is no such folder, or don't create one (false)
$timeout – maximum time to perform this operation (in seconds), by default - 60 seconds, if the operation is not completed during this time, the script continues to run further.
After testing, the function returns the result of its work to the script :
true – operation completed (boolean) false – operation failed (boolean)