RE: [PHP-GENERAL] Win32 PHP Include help
| From: | Paul Denman | Date: | Thu, 15 Jun 2000 12:49:40 +0000 |
| Subject: | RE: [PHP-GENERAL] Win32 PHP Include help | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-1928@lists.php.net to get a copy of this message | ||
I've found the answer! :-)
Thanks to Matt Dean of Ananova Ltd...
I'll share it with you all, just in case you come a cropper at some time in
the future....
The php.ini file *was* correct:
[...snip]
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
include_path = 'C:\Program Files\Apache\lib';
[snip...]
What happened was my ref below of:
include ("\\includes\\test.inc");
Was being interpreted as c:\includes\test.inc, so all I had to do was change
it to:
include ("includes\\test.inc"); (the double slash being to escape a
slash char.)
And it worked.
Cheers,
Paul.
:
:
Heaven is only a mouse click away...
http://guest.btinternet.com/~g.cooper/p-nec.jpg
-----Original Message-----
From: Paul Denman [mailto:paul.denman@ananova.com]
Sent: 15 June 2000 02:51
To: php-general@lists.php.net
Subject: [PHP-GENERAL] Win32 PHP Include help
Help!!!
I'm trying my hand at include files & can't get it to work! :(
I'm using PHP4 on a Win2000 machine with Apache as the web server... No
problems generally... Until now...
DETAILS
=======
Apache is installed at:
c:\program files\apache
I've stuck the include file I want in the 'lib' directory of Apache:
c:\program files\apache\lib\includes\test.inc
I've edited the php.ini file in c:\winnt to read:
[...snip]
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
include_path = 'C:\Program Files\Apache\lib';
[snip...]
And I've written a test file (test1.php4) that reads:
[...snip]
<?php
print ("Testing an include file...<BR>\n");
include ("\\includes\\test.inc");
?>
I get the following result:
--------
Testing an include file...
Warning: Failed opening '\includes\test.inc' for inclusion
(include_path=''C:\Program Files\Apache\lib'') in c:\program
files\apache\htdocs\mysql_php\test1.php4 on line 18
--------
I've tried all sorts of variations of escaping, quotes, double-quotes etc.
to try and get it to see the 'test.inc' file - but I'm failing miserably...
Can anyone offer any advice???
Thanks in anticipation,
Paul.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net