cmd - php calls exec function to execute bat script? ?

WBOY
Release: 2016-10-17 09:30:11
Original
1857 people have browsed it

php calls exec to execute the command in the bat script. Why is the previous line of command still being executed, but the next line of command is executed? ? ? Bat Xiaobai, I hope someone can tell me, how can I make the previous line of command execute and then execute the next line? have any good ways?

Reply content:

php calls exec to execute the command in the bat script. Why is the previous line of command still being executed, but the next line of command is executed? ? ? Bat Xiaobai, I hope someone can tell me, how can I make the previous line of command execute and then execute the next line? have any good ways?

Thanks for the invitation

I don’t understand

start xx.exe
or start xx.bat

PHP’s exec is what executes the console. As for any problems, it’s not about PHP

If you want the commands in bat to be executed sequentially, you need to add the call keyword before the command: such as:

<code>call dir
call xxxx.exe</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!