Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.