Jump to content

Recommended Posts

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?!

Link to comment
https://forums.phpfreaks.com/topic/51717-solved-php-passthru/
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/51717-solved-php-passthru/#findComment-254854
Share on other sites

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"

Link to comment
https://forums.phpfreaks.com/topic/51717-solved-php-passthru/#findComment-254978
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.