1. Write a PHP program, named test.php. The content is as follows:
Copy the code The code is as follows:
$fp = fopen("test.txt", "a+");
fwrite($fp, date("Y-m-d H:i:s") . " Success, success! n") ;
fclose($fp);
?>
Write the program boldly, you can use any includerequire, no problem
2. Create a new Bat file and name it test .bat, the content is as follows:
Copy code The code is as follows:
D:phpphp.exe -q D:websitetest .php
//Change the corresponding directory yourself
3. Create a WINDOWS scheduled task:
Start–>Control Panel–>Task Schedule–>Add task schedule
Browse the folder and select the bat file above
Set the time and password (log in to WINDOWS)
Save it.
4. over! You can right-click the scheduled task and click "Run" to try
http://www.bkjia.com/PHPjc/324649.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/324649.htmlTechArticle1. Write a PHP program, named test.php, the content is as follows: Copy the code as follows: ? $fp = fopen("test.txt", "a+"); fwrite($fp, date("Y-m-d H:i:s") . "Successful!...