This is a discussion on PHP Include (Most Recent HTML File)? within the Coding Help forums, part of the Webmaster Help category; I'm trying to use the php include function to call a html file into a php page. The html files ...
| |||||||
| Register | Forum Rules | FAQ | Donate | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Use the 'system' command with 'stat filename' and then rip out the bit you're interested in? Why do you want to put your html files in a database? Seems a bit overly complex... |
| |||||
| yes use a database and just store the path to the file including the date last modified, so you can access the last one all the time.
__________________ :. Web Design & Development Web Design Ireland :. Search Engines Optimization Search Engines Optimization :. Directory Submission Directory Submission :. News & Press Release Ireland GiveItSocks.com :. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories :. I Have 2 Find It Directory SEF Directory |
| |||||
| Quote:
I'm just beginning with PHP so am not to up on system and stat filename but I'll look into it. Cheers! |
| |||||
| Quote:
The basic code to get the file you want is: PHP Code: |
| |||||
| Actually, replace all instances of filectime with filemtime, that will give you the last modified time which is what you need. Niall |
| |||||
| Excellent niall, that sounds perfect. Thanks a million. I'll try it out now! Just to fill you in, I run a local football club website and have to update the fixtures/results page each week. It's not archived at the moment so all I want to do is create the html file, dump it into a folder in the root and let the webpage call it up. This script should do the job nicely |