• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Alternative to "php include" code

bluestrobe

Platinum Member
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?
 
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.
 
Back
Top