PHP self-resolution batch processing

Source: Internet
Author: User
Tags php cli
About the title: PHP + BAT making PHP self-resolution batch processing is a BAT file that contains dos bat batch processing code and php cli code. Because the suffix is BAT, I click BAT on the WIndows system to run it.

Title: php bat self-resolution batch processing

That is, a BAT file contains dos bat batch processing code and php cli code. Because the suffix is BAT, I click BAT on the WIndows system to run it.

Because I have done some special processing on PHP, it can use the PHP CLI to parse its own PHP commands.

Usage:

For example, if you want to make a PHP-CLI release package, you can refer to this script for your own installation program.

Original code:
Filename: phpbat. bat
Code:

@ REM @ REM ='
@ Set phpcli = F: \ usr \ local \ php4 \ php.exe
@ REM phpclishows the path of your clim php.exe.
@ % PHPCLI % 0
@ Goto: EOF
@ REM ';?>
Echo '\ rHello World ';
Exec ('pause ');
?>

A little clarification, the wonderful application of the BAT batch processing of REM instructions and PHP ''to define the string method, so that the two are mixed, and complementary interference.

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.