1, write a PHP program, named test.php, the content is as follows:
Copy CodeThe code is as follows:
$fp = fopen ("Test.txt", "A +");
Fwrite ($fp, Date ("Y-m-d h:i:s"). "Success has been successful!" \ n ");
Fclose ($FP);
?>
Program boldly write, what include\require, even if used, no problem
2. Create a new bat file named Test.bat, which reads as follows:
Copy CodeThe code is as follows:
D:\php\php.exe-q D:\website\test.php
The corresponding directory to change their own
3. Set up Windows Scheduled tasks:
Start –> Control Panel –> Task Scheduler –> add a task schedule
Browse for Folder Select the bat file above
Set time and password (login to Windows)
Save it.
4, over! You can right-click to schedule the task point "run" to try
http://www.bkjia.com/PHPjc/324649.html www.bkjia.com true http://www.bkjia.com/PHPjc/324649.html techarticle 1, 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"). "Success has been successful!" ...