Quote:
Originally Posted by tripy
|
Eh, sorry. I searched with Google and search PHP's website and found several things about changing include_path but that didn't seem to be my problem. It's hard to find something you expect to be so simple and common though...
Although I admit I didn't use the search feature here. Probably should have over google, since this is a support site compared to thousands of example scripts and such
Anyway, thanks mtishetsky and tripy that absolute path should work great. Haven't used global variables yet (other than _GET and _POST).
------
EDIT: Another problem. This obviously doesn't fix the images.
"C:\xampp\htdocs\images/myimg.png"
Most search results for site root and images return using a slash...
"/images/myimg.png"
However, when used from a subdomain it retains the subdomain. It doesn't seem to work as the site root.
url('/image/myimg.png'); still returns:
"/blog/images/myimg.png" (Not supposed to use blog folder)
Is there something like $_SERVER("WEBSITE_ROOT") or something that rather than returning the local address, returns the website address and/or default directory?
ex:
$_SERVER("WEBSITE_ROOT") . "/images/myimg.png"; when used in another folder would output: http://my_site.com/images/myimg.png"
Anything like this exist? And how exactly does the forward slash work? (Because it doesn't seem to do what I need it to do...)
Last edited by RadGH; 02-20-2008 at 07:37 AM..
|