I don’t understand much about php, I had to log the results of js tests to a file. In general, here is a php script that writes logs from YUI tests to a file:
$serverTime = Date('YmdHis'); $logFile = "result/log".$serverTime.".html"; $logFileHandle = fopen($logFile, 'a'); $messageReceived = trim($_REQUEST["msg"]); fwrite($logFileHandle, $messageReceived."\r\n"); fclose($logFileHandle);
During the test, this script creates several log files. I only need one for the duration of the test. How to do it right?