Click here to get back home

shell script + php

 HomeNewsGroups | Search | About
 comp.lang.php    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
shell script + php alexus 07-25-2008
Get Chitika Premium
Posted by alexus on July 25, 2008, 1:49 am
Please log in for more thread options
I'm writing a shell script and inside of it I have variable that I
want to pass to php, but for some reason it isn't working... can
someone help me? here is example

#!/bin/sh

i=127.0.0.1

php -r 'geoip_country_name_by_name($i);'

echo $?

php part works in shell if i use actual value from variable and not
variable itself

Similar ThreadsPosted
a PHP script works fine when called from the browser but not as a shell script December 21, 2005, 9:06 am
shell script - to not change working directory to that of the script September 8, 2004, 1:54 pm
How can I run php scripts from a shell script? June 18, 2005, 2:27 pm
Reading Shell Script Results July 5, 2005, 7:07 am
sending a variable to a shell script? April 10, 2006, 11:04 am
how do arrays pipe from one PHP shell script to another? February 7, 2008, 10:24 pm
PHP web interface for shell script or command June 12, 2008, 1:06 pm
setting $_SERVER variables from a shell script July 19, 2007, 5:12 pm
Interactive PHP shell - can it be done? November 29, 2004, 7:54 pm
run php directly at shell June 3, 2006, 5:01 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap