Reply to Re: PHP exec

Your name:

Reply:


Posted by shimmyshack on 05/07/07 10:27

On May 7, 7:41 am, CorfuVBProgrammer <merianosni...@gmail.com> wrote:
> Hello All . . .
>
> I need some help about exec command.
>
> I have create an executable that return the System Drives. It is based
> on DOS and does not need any parameter.
>
> I have create my php script that executes the executable i've create
> and the source code is the following :
>
> ##########################################
> php:
>
> exec("SystemDrives", $out);
>
> for($i = 0; $i <= sizeof($out)-1; $i++)
> {
> echo $out[$i];
> execMediaID($out[$i]);
> echo "<br />";
>
> }
>
> ##########################################
>
> The php script is in the followin directory :
>
> http://localhost/MyApplication/Applications/SystemDrives.php
>
> in the same directory is and the executable
>
> http://localhost/MyApplication/Application/SystemDrives.exe
>
> The problem is that if i will call the SystemDrives.php from parent
> directory then i don't get any result.
>
> For example if i will execute the following script i don't have any
> result
>
> php:
> index.php
> <?php
> include_once("Applications/SystemDrives.php");
> ?>
>
> that the index located in the following directory
>
> http://localhost/MyApplication/index.php
>
> What can i do to execute the directories.
> ------------------------------------------------------------------------------------------------------------------------------------------
>
> Thanks a lot . . .

use absolute paths, or use chdir() before you attempt to call an
executable, this is a path issue. the OS will only find the exe if you
tell it where it lives, or if the exe is in the PATH.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация