Page 1 of 1

include full url to site?

Posted: Fri Jun 21, 2002 9:10 am
by Patriot
how would you include the full url of the site in an include?

in my errors when the page can't be found it shows:
'S:\Inetpub\sites\smyr argetroot php\headlines.txt'
so i put it in the include:
<? include("S:\Inetpub\sites\smyr\targetroot\nphp\headlines.txt") ?>
but i get this:
Warning: Failed opening 'S:\Inetpub\sites\smyr argetroot php\headlines.txt' for inclusion (include_path='.;c:\php4\pear') in S:\Inetpub\sites\smyr\targetroot\right8.php on line 109

am i missing something?
or is it just a typing mistake?

Posted: Fri Jun 21, 2002 10:09 am
by twigletmac
Try to use forward slashes instead of backslashes - or escape them so:

Code: Select all

include 'S:/Inetpub/sites/smyr/targetroot/nphp/headlines.txt';
// OR
include 'S:\\Inetpub\\sites\\smyr\\targetroot\\nphp\\headlines.txt';
Mac

Posted: Fri Jun 21, 2002 11:29 am
by honkyinc
I would assume that since the function takes relative URI paths, it would also take absolute paths in the same format.

Code: Select all

include("/includes/mydoc.inc");
Should work like:

Code: Select all

include("http://www.completesource.net/includes/mydoc.inc");

Posted: Fri Jun 21, 2002 11:36 am
by will
yeah, it works fine using absolute paths