![]() |
Code: I want to run an .exe program from Codeigniter 3 on an IIS server, but it doesn't do anything. Does anyone know how to configure the IIS server so that I can start an .exe program?
To get a literal backslash and not to escape a character, you need to double the backslahes:
PHP Code: <?php
There may be other problems, but the problem with your path was the first of them...
I don't see your error message.
I solved !
<link rel="shortcut icon" href="#"> <?php //phpinfo(); error_reporting(E_ALL); $output=null; $retval=null; //exec('c:\inetpub\vhosts\programozas.org\cgi-bin\OlszCommandLine.exe TOKENEXCHANGE C:\TMP\VALASZ.TXT', $output, $retval); exec('..\cgi-bin\OlszCommandLine.exe TOKENEXCHANGE C:\TMP\VALASZ.TXT', $output, $retval); //exec('dir',$output,$retval); echo "Returned with status $retval and output:\n"; print_r($output); ?> -Must use IUSER in IIS Which is a huge lesson for me: 1.I was expecting the exe to physically start, but since this is a server here nothing physical is running! 2. My program was expecting parameters and I did not specify them, the above code will help to highlight this. After giving the parameters also the exe no longer wrote an error message. 3.I saw the run as working by getting an answer.txt t in the c: \ tmp directory that contained the tokenxchage of the online account. |
Welcome Guest, Not a member yet? Register Sign In |