Windows Server 2003+IIS6 How to execute BAT file under PHP

Source: Internet
Author: User
How does PHP execute a BAT file under Window server 2003+IIS6?
Another EXE program was called in my bat file, the code is as follows
@echo off
CD "Path to my exe program"
Dir
Xxx.exe argument1 Argument2
Exit
Then I call the bat file in PHP and the code is as follows
$res = System (' cmd/c c:\\ivl\\view\\webrooms\\test.bat ', $retval);
echo "
". $res." Return: "$retval;
The result is output from the dir command, but there is no Xxx.exe program to execute the call.

I checked the information on the Internet and gave iuser_xxx the ability to read and execute Xxx.exe and the directory where the batch files were located, but still could not execute.
May I ask you, how should the code be realized?

Thank you!

------Solution--------------------
Now that you know it's a permissions issue.
So, give the right permission on the line ....
------Solution--------------------
Why do I have to "cmd/c" to execute the bat file? Is it the same with direct execution?
  • 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.