$Name
Email: $Email
主页: $Website
留言: $Comments
发表时间: $Today

.:::."; #This Line adds the 'GuestBook=' part to the front of the data that is stored in the text file. This is important because without this the Flash movie would not be able to assign the variable 'GuestBook' to the value that is located in this text file $New = "$Input$OldData"; #Opens and writes the file. $fp = fopen( $filename,"w+"); fwrite($fp, $New, 80000); fclose( $fp ); } #################################################################################### ########## Formatting and Printing the Data from the Guestbook to the Flash Movie ## #Next line tells the script which Text file to open. $filename = "GuestBook.txt"; #Opens up the file declared above for reading $fp = fopen( $filename,"r"); $Data = fread($fp, 80000); fclose( $fp ); #Splits the Old data into an array anytime it finds the pattern .:::. $DataArray = split (".:::.", $Data); #Counts the Number of entries in the GuestBook $NumEntries = count($DataArray) - 1; print "&TotalEntries=$NumEntries&NumLow=$NumLow&NumHigh=$NumHigh&GuestBook="; for ($n = $NumLow; $n < $NumHigh; $n++) { print $DataArray[$n]; if (!$DataArray[$n]) { Print "

没有更多的留言了!"; exit; } } #################################################################################### ############### End GuestBook Script ?>