For help PHP failed to execute system command

Source: Internet
Author: User
Function: Convert picture format via external program (not available in several ways, through shell can be successful, but returned by PHP 1, the explanation is wrong)
EXEC ("C:/Program files/irfanview/i_view32.exe c:/program Files/irfanview/03280009.sff/convert=c:/program Files/ Irfanview/4.tif ", $result, $status); Echo $status;


EXEC ("C://program files//irfanview//i_view32.exe c://program Files//irfanview//03280009.sff/convert=c://program Files//irfanview//4.tif ", $result, $status); Echo $status;


EXEC ("C:\Program files\irfanview\i_view32.exe c:\Program files\irfanview\03280009.sff/convert=c:\program Files\ Irfanview\4.tif ", $result, $status); Echo $status;


EXEC ("C:\\Program Files\\irfanview\\i_view32.exe C:\\Program Files\\irfanview\\03280009.sff/convert=c:\\program Files\\irfanview\\4.tif ", $result, $status); Echo $status;


PS: Safe mode is not turned on


Reply to discussion (solution)

Do you have this i_view32.exe in the system running in the interface?

Do you have this i_view32.exe in the system running in the interface?
Run directly with the interface, to the format of the word is only the command call should not appear interface.

Ps:irfanview is a powerful free view software, before the Java version of the program can be executed, to PHP is not.

Just the command call should not appear interface???
It can't be!
You execute it in the Command window and post the command if you have no problem.

Expression error, hehe, OK no interface, no pop-up window:
C:\Program Files\irfanview>i_view32.exe C:\Program Files\irfanview\03280009.sff/convert=c:\program Files\ Irfanview\4.tif

Giving C:\Program Files\irfanview>i_view32.exe the right to execute the general user

"C:/Program Files/irfanview/i_view32.exe

You write the red part as a parameter (equivalent to a bad DOS command), the path has a space to use the quotation marks

Giving C:\Program Files\irfanview>i_view32.exe the right to execute the general user
I have seen this suggestion before, but right-click Properties do not see this authorization, how to operate it?

"C:/Program Files/irfanview/i_view32.exe

You write the red part as a parameter (equivalent to a bad DOS command), the path has a space to use the quotation marks
There are spaces, but I have to adjust the path after the execution of the time has been waiting, it seems that the card is dead, is not to authorize AH.

It worked:
1, the path can not take a space, such as with a space to special treatment;
2, correct wording: exec ("C:\\irfanview\\i_view32.exe c:\\irfanview\\03280009.sff/convert=c:\\irfanview\\4.tif", $result, $ status);

  • 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.