LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Passing a value from a shell script to a php file (https://www.linuxquestions.org/questions/programming-9/passing-a-value-from-a-shell-script-to-a-php-file-451321/)

kushalkoolwal 06-03-2006 05:54 PM

Passing a value from a shell script to a php file
 
Hi,

I have written a shell script and one of the steps of the shell script is to run a php file. Now I have a variable in my shell script called $path which has some value. Now what I would like to do is to pass this value to my php file which I am calling from my shell script. My shell script name is installer.sh and my php file name is installer.php. Here is some part of my shell script
Code:

#!/bin/bash

echo "blah blah"

#get the value
$PATH="/usr/local"

#call the php file
php installer.php


graemef 06-03-2006 06:04 PM

Look at example 43-1 it should help

kushalkoolwal 06-03-2006 07:51 PM

Quote:

Originally Posted by graemef
Look at example 43-1 it should help

Yeah I had found the same page before but I could not figure where should I run my shell script from? Will my shell script and php file reside in the same file?

any help will be highly appreciated.

kushalkoolwal 06-03-2006 08:58 PM

Ok i did found out the way. Thanks for the effort due. Really appreciate it.

reyl 07-07-2010 06:25 AM

I'm having the same problem. May I know how you did it?


All times are GMT -5. The time now is 11:31 AM.