Re: Path getting messed up - cannot find a file
- From: No_One <no_one@xxxxxxxxxxxx>
- Date: Sat, 23 Feb 2008 00:46:31 -0600
On 2008-02-23, Otis <otie_nospam@xxxxxxx> wrote:
If I run the following code:
exec ("swetest -edir$sweph -b$utdatenow -ut$utnow -p012 -eswe -flsj -g,
-head", $out);
all is well - PHP finds the program swetest and makes the calculations.
But if I then insert this beforehand:
$NetGeoHTML = file_get_contents($NetGeoURL, 99000);
exec ("swetest -edir$sweph -b$utdatenow -ut$utnow -p012 -eswe -flsj -g,
-head", $out);
I get no output because apparently PHP does not know where to find the
program called swetest. Why does "file_get_contents" mess up my "path" and
how do I get this to work?
Thank you.
FWIW, generally, it's a good idea to specify the full path to the program.
for example:
exec ("/usr/local/bin/swetest -edir$sweph -b$utdateno...............
ken
.
- References:
- Path getting messed up - cannot find a file
- From: Otis
- Path getting messed up - cannot find a file
- Prev by Date: What is the best practice?
- Next by Date: PHP Reference Guide
- Previous by thread: Re: Path getting messed up - cannot find a file
- Next by thread: What is the best practice?
- Index(es):