The program writes boldly , even if I use includerequire, I don’t even ask."/> The program writes boldly , even if I use includerequire, I don’t even ask.">
Home >Backend Development >PHP Tutorial >Windows vista home basic How to set up scheduled tasks to execute PHP files in WINDOWS
1. Write a PHP program, named test.php, with the content as follows:
Copy the code The code is as follows:
$fp = fopen("test.txt", "a+" ; Although it is used, there is no problem
2. Create a new Bat file and name it test.bat. The content 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 plan
Browse the folder and select the bat file above
Set the time and password (Log in to WINDOWS)
Save it.