I made a shell script recently to enable windows users on my network to generate pdf's using a virtual network printer on a linux box.
I also got the shell script to execute a php script, the idea being that php would grab the file just created and include it automatically in to the file management system I am building using php.
It works more or less, the php file is executed. Only problem is that I can't figure out how to pass variables to php from a shell script.
I didn't really want to call php indirectly through the webserver as some do, but directly using a line in my shell script like this:
php -f /tmp/test.php?file=$OUTDIR/$2$DATE.pdf
It works, but I can't get it to accept arguments. I have tried a variety of methods for passing variables. I tried it using these variations:
php -f /tmp/test.php variable1=test
php /tmp/test.php variable1=test
Does anybody have a clue how to pass argument s to php without having to invoke an entire URL through a browser?
Greetings,
David.