delete_line_from_file
delete_line_from_file($file,$line,$timeout=COMMAND_TIME); - delete the specified line in the file, available from version 7.0.4
The function accepts parameters as input:
$file – path to the file to delete the line in. It can be either absolute or relative (relative to the script folder).
$line – the number of the line to delete in the file (starts with 0)
$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 further.
After testing, the function returns the result of its work to the script :
true – operation completed (boolean) false – operation failed (boolean)