Elliott Posted January 29, 2014 Share Posted January 29, 2014 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 Quote Link to comment https://forums.phpfreaks.com/topic/285761-php-includes/ Share on other sites More sharing options...
trq Posted January 29, 2014 Share Posted January 29, 2014 You described what your wanting to do, but failed to describe any problem. Do you have a question? Quote Link to comment https://forums.phpfreaks.com/topic/285761-php-includes/#findComment-1466923 Share on other sites More sharing options...
cyberRobot Posted January 29, 2014 Share Posted January 29, 2014 Have you considered using a database? The profiles could be stored in a database and indexed with an ID. You could then pass an ID to a single PHP script which would pull the necessary information from the database. Quote Link to comment https://forums.phpfreaks.com/topic/285761-php-includes/#findComment-1466928 Share on other sites More sharing options...
mac_gyver Posted January 29, 2014 Share Posted January 29, 2014 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. Quote Link to comment https://forums.phpfreaks.com/topic/285761-php-includes/#findComment-1466937 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.