I've to read variables out of a config-file, that is stored on a
Linux-machine.
When I connect to the server with puTTY, I can execute the config with:
.. /usr/local/webspace/config
then I can echo the contained variables:
echo $var1
everything works fine.
Now I want to execute the config by a php-script.
I try to open the file with the system() command:
system('. /usr/local/webspace/config', $retval);
I hoped to get the same variables now for doing some stuff with them in php.
But there are no variables, but the $retval = 0
Any ideas?
Arne Lund
Linux-machine.
When I connect to the server with puTTY, I can execute the config with:
.. /usr/local/webspace/config
then I can echo the contained variables:
echo $var1
everything works fine.
Now I want to execute the config by a php-script.
I try to open the file with the system() command:
system('. /usr/local/webspace/config', $retval);
I hoped to get the same variables now for doing some stuff with them in php.
But there are no variables, but the $retval = 0
Any ideas?
Arne Lund
Comment