| 6:50 pm on Nov 11, 2008 (gmt 0)|
You should just be able to do "/myimages.jpg" Just a simple "/"
| 7:01 pm on Nov 11, 2008 (gmt 0)|
<?php include $_SERVER['DOCUMENT_ROOT'].'/mypage.htm'; ?>
| 9:19 pm on Nov 11, 2008 (gmt 0)|
I'll give that a try. Had some issues with something similar.
| 10:59 pm on Nov 11, 2008 (gmt 0)|
Posting back, maybe this will help someone else.
It seems that part of my confusion is that there isn't one solution for specifying the root path for both HTML paths and PHP paths. At least I can't make one work.
A preceding slash '/' does get you to the root for image paths for HTML.
I must have forgotten that gem.
This however does not seem to work for PHP paths for use with INCLUDE statements.
$_SERVER['DOCUMENT_ROOT'] does work for includes.
However, in my particular instance it does so only on my local server. I am running my site on the Mosso Hosting cloud and $_SERVER['DOCUMENT_ROOT'] does not produce the correct server path, so I have to specify it manually.
$_SERVER['DOCUMENT_ROOT'] does not work for me if echo'd as part of the image tag HREF path.
| 1:05 am on Nov 12, 2008 (gmt 0)|
you're confusing the two things
>> for me if echo'd as part of the image tag HREF path.
and it shouldn't, this is a filesystem path, from the root of the server, not just your website
>> A preceding slash '/' does get you to the root for image paths for HTML.
again, as designed, a slash in an html tag implies 'start at the root of the site'
so everything is working exactly as it should
| 12:21 pm on Nov 12, 2008 (gmt 0)|
For HTML why not use a base reference in between your <head> </head> tags:
<base href="http://www.yourdomain.com/" >
| 5:01 pm on Nov 12, 2008 (gmt 0)|
Yeah I forgot some HTML basics here.