tps2 Posted May 16, 2007 Share Posted May 16, 2007 Hi, quite new to this forum here - i wrote this bit of code to process the dos command to use the LITConvertDemo.exe with the .opf file and the .lit file. The Dos Command required is D:\oeat\mockup\csdk\CDemos\LITConvertDemo\Release\LITConvertDemo.exe "D:\oeat\mockup\upload\path\path\path.opf" "D:\oeat\mockup\upload\path\path.opf" Where "path" equals $_SESSION['title'] <?php passthru(`"D:\oeat\mockup\csdk\CDemos\LITConvertDemo\Release\LITConvertDemo.exe".' "D:\\oeat\\mockup\\upload'."\\".$_SESSION['title']."\\".$_SESSION['title']."\\".$_SESSION['title'].".opf"." "." ".'"D:\\oeat\\mockup\upload'."\\".$_SESSION['title']."\\".$_SESSION['title'].".lit".""`, $output2); echo("<h1> ATTEMPT 2 </h1>"); echo "<pre>" . var_export($output2, TRUE) . "</pre>\n"; ?> But it doesn't work - think its a formatting error or something!! can anyone help?! Quote Link to comment https://forums.phpfreaks.com/topic/51717-solved-php-passthru/ Share on other sites More sharing options...
tps2 Posted May 16, 2007 Author Share Posted May 16, 2007 Can anyone spot any formatting problems that occur in this code as It is returning $output2 as "1" instead of performing the process on the commandline <?php passthru("D:\\oeat\\mockup\\csdk\\CDemos\\LITConvertDemo\\Release\\LITConvertDemo.exe". "D:\\oeat\\mockup\\upload"."\\".$_SESSION['title']."\\".$_SESSION['title']."\\".$_SESSION['title'].".opf"."". "D:\\oeat\\mockup\upload"."\\".$_SESSION['title']."\\".$_SESSION['title']."\\".$_SESSION['title'].".lit"."", $output2); ?> Look forward to your response Quote Link to comment https://forums.phpfreaks.com/topic/51717-solved-php-passthru/#findComment-254854 Share on other sites More sharing options...
MadTechie Posted May 17, 2007 Share Posted May 17, 2007 missing spaces "D:\\oeat\\mockup\\csdk\\CDemos\\LITConvertDemo\\Release\\LITConvertDemo.exe". " D:\\oeat\\mockup\\upload"."\\".$_SESSION['title']."\\".$_SESSION['title']."\\".$_SESSION['title'].".opf"." D:\\oeat\\mockup\upload"."\\".$_SESSION['title']."\\".$_SESSION['title']."\\".$_SESSION['title'].".lit" Quote Link to comment https://forums.phpfreaks.com/topic/51717-solved-php-passthru/#findComment-254978 Share on other sites More sharing options...
tps2 Posted May 17, 2007 Author Share Posted May 17, 2007 Thanks very much for that - sorry about my poor post prior - very new too this forum!! Thats now work - a second set of eyes is always invaluable!! Thanks again Quote Link to comment https://forums.phpfreaks.com/topic/51717-solved-php-passthru/#findComment-255289 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.