Jump to content

Recommended Posts

i want this to execute dos then change direrectory  in dos then use that

program with the given values any help please...

 

<?php
exec('C:/windows/system32/cmd.exe, cd image programs, snapshotter.exe 
-u  "http://google.com" -o  "c:/images/test.jpg" -w 120 -h 120 ');
?>

Link to comment
https://forums.phpfreaks.com/topic/112217-exec-not-working/#findComment-576065
Share on other sites

This is where the application is....

 

C:/Documents and Settings/admin/Desktop/image programs/snapshotter.exe

 

 

but i need the command prompt to execute it...........

 

any idears or does exec do it automatickly

 

example

 

 

exec('cmd.exe,C:/Documents and Settings/admin/Desktop/image programs/snapshotter.exe');

 

get me how to get the command prompt to execute the current ....

Link to comment
https://forums.phpfreaks.com/topic/112217-exec-not-working/#findComment-576102
Share on other sites

 

example is this how to use exec() to get command prompt to execute a folder in it windows folders

     <?php
     
     exec(' C:\WINDOWS\system32\cmd.exe,C:\Documents and Settings\ad
          min\Desktop\image programs\snapshotter.e
          xe -u  "http://google.com" -o  "c:/i
          mages\test.jpg" -w 120 -h 120" ');  
     ?>

 

Link to comment
https://forums.phpfreaks.com/topic/112217-exec-not-working/#findComment-576105
Share on other sites

HERE WHAT I WANT TO DO BUT HOW PLEASE....

 

i have tried all backslash foward slash everthink...........

 

all works manually with the 3rd party program.......

 

so i need to no how to change a directory CD while using exec() while in cmd.exe.....

 

tried everythink man.............

 

     <?php
     
     
     exec(' C:/WINDOWS/system32/cmd.exe'); //open cmd.exe

     exec('Desktop/image programs'); // goto this directory from cmd.exe


     exec('snapshotter.exe -u  "http://google.com" -o  "c:/images/test.jpg" -w 120 -h 120');// execute this from folder image programs
     
     ?>

Link to comment
https://forums.phpfreaks.com/topic/112217-exec-not-working/#findComment-576123
Share on other sites

did any one no how to use the exec() for php please cheers.....

 

 

below is my quistion friends...........

 

 

 

everthink works manualy but not using the exec() function.............

 

yes i tried the exec() function and it works fine with a sample file........

 

 

     <?php
     
     
     exec(' C:/WINDOWS/system32/cmd.exe'); //open cmd.exe

     exec('Desktop/image programs'); // goto this directory from cmd.exe


     exec('snapshotter.exe -u  "http://google.com" -o  "c:/images/test.jpg" -w 120 -h 120');// execute this from folder image programs
     
     ?>

Link to comment
https://forums.phpfreaks.com/topic/112217-exec-not-working/#findComment-576685
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.