|
Posted by Mark Goodge on October 1, 2007, 2:53 am
Please log in for more thread options On Mon, 1 Oct 2007 00:51:51 -0500, Heidi put finger to keyboard and
typed:
>Heidi wrote:
>: the server my sites are hosted on had a hard drive failure.
>: They put everything back to normal... sort of...
>
>Okay nevermind I found the fix. What I don't get is why the full url didn't
>work suddenly when it used to before the crash Sunday.
>
>So now I am using ../nav.html instead of the full path to the nav.html file.
They may have disabled URL includes. It's a security risk anyway, as
well as being an unnecessary overhead on the server. It's far better
to to use file paths, either relative or absolute, than URL paths.
If you don't know the full absolute file path (which you may well not,
on a shared host), then you can get the server to fill that in for you
by using this type of construction:
<?php
include($_SERVER['DOCUMENT_ROOT'] . "/myfile.html");
?>
which is equivalent to a URL include of
<?php
include ("http://example.com/myfile.html");
?>
and will work from any page on the site, even in a subdirectory.
Mark
--
http://www.MotorwayServices.info - read and share comments and opinons
"I don't care if it hurts, I want to have control"
|