View Full Version : Remote Files
johreiki
12-09-2003, 10:57 PM
On my site, I often use remote javascript files to insert content on multiple pages. I know it's possible for people to disable javascript on their browsers -- in which case they will be missing part of my content (though I can't imagine why someone WOULD disable javascript).
I've learned another way of inserting content, with remote SSI files. I can't use this on my site, because my host does not support SSI....but I'm about to start making a site for someone who CAN use SSI. I was all set to use it, and then just recently read (in a newsletter from a respected authority on site design) that the newer browsers are allowed to ignore anything within HTML comment tags. Now I'm wondering if these new browsers will actually be set to do that. If so, they will not read the links to my remote SSI files, which have the form:
Is there truly a danger of browsers not reading what's in comment tags now....and, if so, is there another way to do a remote SSI file?
Thanks in advance ------
_||_
db
carbonize
12-10-2003, 03:53 AM
If you use php then it doesn't matter as the page is sent to the PHP processor first which adds the text from your include and then sends the finished HTML off to the visitors browser.
<?php include('file.html'); ?>
all pages must use the .php or .shtml extension though.
cyanide
12-10-2003, 05:05 AM
I agree with carbonize,
php is the way to go. It works just the same way as SSI.
Just need to have .php as the extension on all your pages and call the includes as mentioned.
The bonus, is: If your client says to you later down the road, that he/she would like to have a guesbook, shopping cart or some type of dynamic integration, then you're pages are already to accept the wonderful world of php / MySQL
johreiki
12-10-2003, 05:39 PM
If you use php then it doesn't matter as the page is sent to the PHP processor first which adds the text from your include and then sends the finished HTML off to the visitors browser.
<?php include('file.html'); ?>
all pages must use the .php or .shtml extension though.
Thanks very much. Apparently my client's host does not support PHP....unless I did something wrong. I made a test page including
<?php include('file.html'); ?>
and saved it both ways: as an .shtml and as a .php. Then I made a file with a line of regular html code (but without <html> or <head> or <body> tags), and saved it as file.html. But the uploaded test page did not show the contents of file.html....
_||_
db
cyanide
12-10-2003, 08:17 PM
To see what components are installed on the server, create a blank page, with only <? phpinfo(); ?>
Save the page as phpinfo.php and upload.
Now navigate to yourdomain.com/phpinfo.php and see what it spits out
What server are you on ?
It's pretty rare that a host doesn't support php, unless it's a free host
johreiki
12-10-2003, 09:42 PM
To see what components are installed on the server, create a blank page, with only <? phpinfo(); ?>
Save the page as phpinfo.php and upload.
Now navigate to yourdomain.com/phpinfo.php and see what it spits out
It puts out <? phpinfo(); ?>
What server are you on ?
It's pretty rare that a host doesn't support php, unless it's a free host
The server is earthlink.net -- it's not a free account, my client is paying them for her own domain.
Thanks again ------
_||_
db
redcircle
12-11-2003, 03:30 PM
I think it's time for your client to find another host.
johreiki
12-11-2003, 04:31 PM
I think it's time for your client to find another host.
I think she has reached that same conclusion....
: ^ )