Languages :: PHP :: php read file date into array |
|||
| By: Nono |
Date: 11/06/2007 16:32:13 |
Points: 20 | Status: Answered Quality : Excellent |
| how to read a file date into an array in PHP ? | |||
| By: VGR | Date: 11/06/2007 16:56:01 | Type : Answer |
|
| I'm not sure I get your question right, but if I make abstraction of the word "date", then the answer is simply : $thearray=file('thefilename'); or ob_start(); $poub=readfile('thefilename'); $thearray=ob_get_contents(); ob_end_clean(); Give more explanations if the word "date" was important ;-) regards |
|||
| By: VGR | Date: 11/06/2007 16:59:32 | Type : Comment |
|
| if you want to get the "file date" of a given file, ie the date the OS knows the file as, you must know there are a lot of differences betweens OSes ; some have creation date, modification date, last access data, etc, and some do not. PHP has all the functions you need in stardard : see fileatime() and filemtime() and filectime() or getlastmod() |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








