1, write a PHP program, named test.php, the content is as follows:
Copy the Code code 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 the Code code 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
The above describes how Windows Vista Home Basic can set up a scheduled task in Windows to execute PHP files, including the contents of Windows Vista Home Basic, and hopefully help friends who are interested in PHP tutorials.