Jump to content

PHP Includes


Elliott

Recommended Posts

Hey legends,

I am in a bit of a pickle. So here it goes.

 

The website I am maintaining and originally designed a couple of years ago is an actor agent website that has about 400 or so actor profiles on it. To do anything major is not an option. I have used a php include for parts of the website that I change regularly so I don't have to change 100's of pages.

 

Now, I have created folders for each profile according to country, male or female, and then their name.

 

What I want to do is have an identical html file for each actor profile that will reference their own php include file to get various text values like their name, memberships, website address, embedded video iframe, etc... and then have these php include files in one folder in the main directory so I can upload them easily. It is all about uploading them all especially since their are 400 clients or so.

 

I hope this makes sense.

Cheers for any help.

Elliott

Link to comment
https://forums.phpfreaks.com/topic/285761-php-includes/
Share on other sites

To do anything major is not an option

 

 

what you have described you want to do, with the folders, the repeated html file, and individuel include files IS a MAJOR amount of repetitive work. it will be less work for you, take less time, and take much less ongoing work to maintain the site, if you follow the suggestion given by cyberRobot.

 

since you likely have the existing information hard-coded in html files, assuming it is in a mostly consistant format, you could write a php script to parse through the existing pages, extract the relavant information, and strore that into appropiate database tables.

 

further advantages of having the informaiton stored in a database would be to dynamically/automaically produce any navigation menues, allow searching for any of the infomraiton (which gets updated as soon as the informaiton is added/changed.)

 

in short, having a site like you have described, where you have hundreds of files, is a design leftover from about the year 2001. by not taking advantage of what serve-side scripting and a database driven design can do to simplify all the coding and maintance IS just wasted time.

Link to comment
https://forums.phpfreaks.com/topic/285761-php-includes/#findComment-1466937
Share on other sites

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.