Forum Moderators: coopster

Message Too Old, No Replies

Making a script to run thru php

         

bhagera

10:58 am on Jan 4, 2005 (gmt 0)

10+ Year Member



Hi all,

I have a requirement.I hope i am doing this correctly .
1.I have been trying to make a php script-A fire another script-B thru a include/require/exec/passthru .

2.If B is to have a line something like system("dir");then my script works perfectly fine.

3.If i replace the dir command with an executable which i want to run like system("c:\bin\foo.exe") i get the following error message "Could not get user's name: USERNAME environment variable is not set"

4.I have no idea what this means.

5.My requirement is that the script-A should fire script-B it need'nt return anything to script A.

This is how my code flows
<form action="<?=$_SERVER['PHP_SELF']?>" method="post">
-----
----
---
</form>

<?php
//echo '<pre>';
$entry=stripslashes(htmlentities($_POST['entry']));
if ($entry){
if ($_POST['getdepprods']!=""){
echo "This '$entry' would be mailed.";
//This is where i want to run the SCRIPT B
}
---
---
?>

mcibor

4:44 pm on Jan 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



did you think about making a script B into a function?
To say the truth I have no idea what could be the problem, never had such.