Jump to content

Edit only one php file for a whole site?


Ty44ler

Recommended Posts

I am building a site that has a ton of pages, but the layout is all the same and is only changed by the directory that the php functions call.

 

Is it possible to make a function that calls an external php file so that I only have to edit one file when making a change to the site?

Link to comment
https://forums.phpfreaks.com/topic/160976-edit-only-one-php-file-for-a-whole-site/
Share on other sites

2 things

#1 you need to use quotes

file_get_contents(EditCode.php);

should be

file_get_contents("EditCode.php");

 

#2 if the file contains php code your get the php code back (not the results)

using include will give the php code results

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.