Hello, I believe include problem is a small typo... the include path needs
to be
./:/usr/local/lib/php
There is a php function to change the working directory, I'm not remembering
it off the top of my head, but you can do either:
exec("cd $path && ls -d */*.jpg",$ls);
or:
exec("ls -d $path/*/*.jpg",$ls);
---
Toolshed Computer Productions - Professional PHP Hosting
Hosting - Dedicated Servers - Design - Programming
http://www.toolshed51.com
-----Original Message-----
From: Gonyou, Austin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 12:59 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP 4.0.6 and APXS2
After getting apache 2 + 4.0.6 built and installed, I can finally use PHP
and all is well..except...
When accessing a script which uses an exec() statment like the following:
----snip-----
exec("ls -d */*.jpg",$ls);
----snip-----
When the LS is performed, it is not performed in the directory where the PHP
resides, but rather in /tmp. What's going on here. Also, I have the
following errors:
-----snip-----
Warning: Failed opening 'header.inc.php' for inclusion
(include_path='.:/usr/local/lib/php') in /tmp/really_silly on line 3
Warning: Failed opening 'footer.inc.php' for inclusion
(include_path='.:/usr/local/lib/php') in /tmp/really_silly on line 26
-----snip-----
The includes are relative to the path that the PHP script is in. It should
just work, but instead it does what you see above. I didn't see this
behaviour with Apache 1.3.x but it could be my Output/Input Filter
definitions too. Any feedback is appreciated.
--
Austin Gonyou
Systems Architect, CCNA
Coremetrics, Inc.
Phone: 512-796-9023
email: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]