PHP exec

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
CorfuVBProgrammer
Forum Newbie
Posts: 3
Joined: Wed May 03, 2006 11:49 am

PHP exec

Post by CorfuVBProgrammer »

Jcart | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hello All . . .javascript:bbstyle(-1)
Close Tags

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 :

##########################################

Code: Select all

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/My Application/Applications/SystemDrives.php

in the same directory is and the executable

http://localhost/My Application/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

Code: Select all

index.php
<?php
include_once("Applications/SystemDrives.php");
?>
that the index located in the following directory

http://localhost/My Application/index.php



What can i do to execute the directories.
------------------------------------------------------------------------------------------------------------------------------------------

Thanks a lot . . .


Jcart | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Post Reply