0

Hello and thank you for taking the time to read my question.

I am currently moving a static html site into a faux CMS and have a question about which direction is best recommended.

I have series of 'News Articles' that I would like to make available through a db. Each article is approximately 1000 words. Setting up this db is not such a problem, except since I already have all these articles in formatted html, I was thinking I could just list the article titles and URLS to the articles in the DB and do something like:

$content = file_get_contents($url);

?

All this does though is open the full html page.

What I am wondering is how can I open an html page into a new template.

My other question is can I target different parts of an html page (divs?) to display in this template?

$content=file_get_contents($url.div='article_1');

Or am I just better off dumping all the articles into my database?

Anybody have any suggestions/recommendations I would greatly appreciate it!

thanks!

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by dottomm
0

It would be better to place all the data into a database and perhaps you could make a script that will insert it into the database for you. Then to display the content you just select from the database and display the contents from the database.

0

Thank you Cwarn. I think you are probably right.

However I did find out how to open an html page and display a specific div.

You can read about it here.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.