Hello You from PHP...
I have one question: I have to send the following commands to linux execute, like if i was at the command prompt:
NOVADATA=121422522003 <enter>
export NOVADATA <enter>
../cgi-bin/script.sh<enter>
So, i declared the string NOVADATA e exported, to be used ath "script.sh". I normally made it at the command prompt, beeing successful. But it is not working on PHP. I`m using a code like this:
exec("NOVADATA=121422522003");
exec("export NOVADATA");
exec("../cgi-bin/script.sh");
i`ve also tried with system(), in exec() `s place. and even placing it as a variable, like:
$a = exec("NOVADATA=121422522003");
Well, where am i mistaking? Please, could someone take me out of this???
Thanx in advance
PS: I have chmoded it and it is already with the needed permissions
PHP HEEEEEEEEEEEEELP
Moderator: General Moderators
-
jim lowell
- Forum Newbie
- Posts: 1
- Joined: Tue Feb 04, 2003 6:18 am
- Contact:
Hey Ripper,
The function you want is putenv. Check it out in the manual. It's good stuff. An example would be...
Cheers,
BDKR
The function you want is putenv. Check it out in the manual. It's good stuff. An example would be...
Code: Select all
putenv("GORGEOUS=KATE BUSH");BDKR