2

I am able to call the following exe using windows command line, but using the exec() function, it doesn't work.

I have to pass a directory as an argument to that exe file.

UPDATE:

$command = '""C:\\Users\\cArn\\Documents\\Visual Studio 2010\\Projects\\word_to_pdf\\word_to_pdf\\bin\\Debug\\word_to_pdf.exe" "C:\\wamp\\www\\zabjournal\\files\\journals\\1\\articles""';
exec($command);

Still doesn't seem to work.

3
  • in the command line I think you would quote the path to your exe as it has spaces in it.. Commented Apr 4, 2012 at 16:33
  • 1
    and also change "\" to "\\" Commented Apr 4, 2012 at 16:36
  • The webpage does take some time to load the page, I'm assuming that I got the application to run, but there is no output from the application (it doesnt output pdf files) but it does using cmd Commented Apr 4, 2012 at 16:39

2 Answers 2

1

Use single quote ' instead

$command = 'C:\Users\cArn\Documents\Visual Studio 2010\Projects\word_to_pdf\word_to_pdf\bin\Debug\word_to_pdf.exe C:\wamp\www\zabjournal\files\journals\1\articles';
exec($command);

Thanks

:)

Sign up to request clarification or add additional context in comments.

Comments

0

try

passthru($command) instead off exec()

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.