Question about includes
| From: | Al | Date: | Tue, 24 Nov 2009 14:22:46 +0000 |
| Subject: | Question about includes | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-300058@lists.php.net to get a copy of this message | ||
I'm having an include problem on a shared host and need the answer to the following to cover a key point.
I'm getting this error:
Warning: include_once() [function.include]: Failed opening 'Net/SMTP.php' for inclusion include_path='.:/usr/lib/php:/usr/local/lib/php:/home1/youstart/php/') in /home1/youstart/php/Mail/smtp.php on line 206
What's going on is that my script calls /php/mail.php which includes /Mail/smtp.php. smtp.php has "include Net/SMTP.php" on line 206.
This bothers since the current working directory is effectively where my original script resides; is it not? If so, doesn't the "include Net/SMTP.php on line 206" look for the path relative to it and not in /home1/youstart/php/?
If my assumption is correct, is there a way around the problem? Remember, this is a shared host and changing stuff above the /public_html is a real problem.
My script runs fine on 3 other Linux/Appache/cpanel shared-host servers.
Al.......