Posted by Serge Terryn on 01/20/07 09:44
Gene schreef:
> maybe (i'didn't try it) system('variable="Hello World" && echo
> $variable');
>
> Christoph Burschka napisal(a):
>> I tried to run several shell commands with system() in the same script,
>> but noticed that things like variables and current location don't carry
>> over between them. Essentially, each system() call starts a new thread.
>>
>> Is there any way to make this persistent, that is, to have this:
>>
>> system("variable='Hello World'");
>> ...
>> system('echo $variable');
>>
>> print out "Hello World"?
>>
>> Preferably short of having to put it all into a single call like this:
>>
>> system('variable="Hello World";echo $variable');
>>
>>
>> --
>> CB
>
shell :
#!/bin/bash
var = "Hello World!"
saving as hello.sh
In php
passtru('hello.sh');
--
Posting at the top because that's where the cursor happened to be,
is like shitting in your pants because that's where your asshole
happened to be.
http://www.essetee.be
[Back to original message]
|