Alternative to "php include" code

bluestrobe

Platinum Member
Aug 15, 2004
2,033
1
0
I currently use the <?php include 'file/path' ;?> to insert other files into my web pages to make them act as one for the client. Is there an alternative to using any php for doing the same task with the same results?

I'm ok with CSS and decent with HTML but otherwise new to the arena as far as programming. My main reason for getting away from this are all of my pages are *.php files and kompozer doesn't like php files. Also I figured it is time to see if there is an alternative out there OR is php the best way to do this?
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
What is in the files?

Are you running script code on the server, or is that the -only- use you're making of PHP?

That's the way to inlcude PHP code to run at the server.

You can use .shtml pages to allow including HTML or javascript as part of a single page, it just inlcudes the code it doesn't run it at the server. It also won't let you run server-side code.

You can use script includes to have the client browser download javascript js files or css files.