September 7th, 2000, 04:07 PM
Join Date: Feb 2000
Location: Culver City, Ca
Time spent in forums: < 1 sec
Reputation Power: 0
I am trying to use this code to write to a text file the time ( in milliseconds) it takes to laod a page.
<SCRIPT FOR=window EVENT=onload LANGUAGE="JScript">
var StopTime = new Date();
var TotalTime = (StopTime - StartTime);
window.status = "Total time to load page was " + TotalTime;
// open file for writing
$myfile = fopen("data.txt","a");
// write the file
fputs($myfile, "line $TotalTimen");
// close the file
I get TotalTime to display in the status bar but the PHP file doesn't get created at all. If I run the PHP code stand-alone it works fine.