Helpful Information
 
 
Category: PHP
Function of Includes without PHP

This is actually a question regarding trying not to use PHP. I was wondering if there is an alternative to using PHP Includes that produces the same effect, in simplifying updates to a menu.
Thanks.

Ummm does that mean you don't want to use PHP? You can include files using the traditional way without using PHP with a .shtml extension if your server supports it. You could use an external javascript file. I'm not sure if I understand your question completely. :confused:

I think you've got it.

That's correct - I don't want to use PHP. I looked at resources/tutorials on Includes, and needless to say, my head's still spinning.

Thank you :)

Elaborating on Spookster's post, here's a tutorial on SSI: http://www.javascriptkit.com/howto/externalhtml3.shtml

:) now I would not want to pressure anyone to use PHP :thumbsup:

however SSI includes and PHP includes could not be much simpler, i.e.

where title.txt contains

<title>included title</title>

then

<html>
<? include(title.txt);?>
<body .... etc

gives the expected result i.e.

<html>
<title>included title</title>
<body .... etc


SSI is no easier & PHP can do a lot more if required.

A tutorial I understand! ;) Thanks, WA. The menu I once edited on every single page, which was beyond tedious, is now a separate file.

Sorry, firepages. SSI already won me over, but thank you for the example. I now realize my head was spinning most likely because I was reading tutorials on PHP in general, including setting up servers, etc.

:)










privacy (GDPR)