add_string_to_file
add_string_to_file($file,$str,$timeout=COMMAND_TIME); - add the specified string to the file
The function accepts parameters as input:
$file – path to the file to add the string to. It can be either absolute or relative (relative to the script folder).
$str – a string to add to the file
$timeout – the 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.
After testing, the function returns the result of its work to the script :
true – operation completed (boolean) false – operation failed (boolean)