Hi all - new here and to php - would post to "newbie" but this section seems more appropriate.
I'm trying to pass a variable to a shell script from a php page.
The php page has the code
<?php exec("./testdoc.sh $version"); ?>
This runs the script testdoc.sh which consists of:
#!bin/sh
export $version
cp template.xml template.$version.xml
The whole lot takes place in a directory owned by the web user, and the shell script executes fine, but the variable isn't being passed or received properly.
Am I using the correct syntax?
Thanks,
Jenny.