visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Languages :: PHP :: php read file date into array


By: Nono Great Britain  Date: 11/06/2007 16:32:13  English  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 English  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 English  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

EContact
browser fav
page generated in 294.476990 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page