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

Windows vista home basic How to set up scheduled tasks to execute PHP files in WINDOWS

WBOY
WBOYOriginal
2016-07-29 08:47:26939browse

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:


Copy the 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 plan
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
The above introduces the method of setting up scheduled tasks to execute PHP files in Windows Vista Home Basic in WINDOWS, including the content of Windows Vista Home Basic. I hope it will be helpful to friends who are interested in PHP tutorials.


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn