Forums

PHP

This topic is locked

File Genie - Format Size & Date

Posted 13 Dec 2005 11:46:35
1
has voted
13 Dec 2005 11:46:35 Matt Bailey posted:
Does anyone know how to format the size and date when using File Genie? For example, at the moment it could show 82871 for a file size, but I would like it to show 83kb (or mb if appropriate).

___________________________________
"Some people say if you play a windows cd backwards it plays satanic messages. That's nothing, because if you play it forwards it installs windows!"

Replies

Replied 13 Dec 2005 11:48:11
13 Dec 2005 11:48:11 Matt Bailey replied:
Sorry, I'm an idiot! You use SizeName instead of Size. Duh...

___________________________________
"Some people say if you play a windows cd backwards it plays satanic messages. That's nothing, because if you play it forwards it installs windows!"
Replied 13 Dec 2005 11:52:12
13 Dec 2005 11:52:12 Matt Bailey replied:
Not sure about formatting the date though. The tutorial says it is shown in Linux format. Can anyone help me with this? I'll do a bit of Googling in the meantime and post here if I solve it so others will know.

___________________________________
"Some people say if you play a windows cd backwards it plays satanic messages. That's nothing, because if you play it forwards it installs windows!"
Replied 13 Dec 2005 16:32:23
13 Dec 2005 16:32:23 Matt Bailey replied:
Right i've figured it out. Here's the code...

<pre id=code><font face=courier size=2 id=code>echo date('l, F d, Y',$filegenietest-&gt;folderList("dateLastModified");</font id=code></pre id=code>

This outputs the date in the format of "Tuesday, December 30, 2005". To format it differently refer to uk.php.net/manual/en/function.date.php.

Hope this helps others <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

___________________________________
"Some people say if you play a windows cd backwards it plays satanic messages. That's nothing, because if you play it forwards it installs windows!"

Reply to this topic