How to implement a PHP file running at the command line under Windows

Source: Internet
Author: User

In Linux to do timing scripts often use the crontab command to execute the PHP file regularly, in fact, under the Windows environment can also use the command line to execute PHP files, the following to see how to achieve it.

(1) Configure the value of the system variable path. Add the path of your PHP program's executable Php.exe file to the path of the system variable (be careful not to change the string that already exists in path, the separator between the values is separated by semicolons, as shown in the following figure), as follows:

(2) According to the above configuration is OK, and then you can directly in the DOS window interface as follows commands to run the PHP script file directly:

PHP D:\PHPnow-1.5.6\htdocs\test.php



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.