[thelist] Grabbing file size off the server?

John C Bullas jcbullas at nildram.co.uk
Tue Sep 30 05:25:29 CDT 2003


At 11:06 30/09/2003, you wrote

I already use

SuppressSize to PREVENT size info appearing in a customised directory list

http://www.ime.org.uk/ime/

Thus, I guess the system variable "fsize" could be grabbed? [might be 
talking out of my stupid fat a** here?]

FSizeCommand

The SSI fsize command. It inserts the size of the unparsed file in the 
document, according to the current value of the variable sizefmt.See 
configCommand.

Parameters: none

Example:

<!--#fsize -->

http://www.w3.org/Jigsaw/Doc/User/SSI.html

FB

>[snip]
>'Volters - Can anyone think of a way to show only images / files in a
>directory that are above / below a certain filesize?
>
>PHP gives lots of nice information for uploading, but when traversing a
>filesystem, it looks like all i can get is unix permissions, id_dir()
>and filenames.
>[/snip]
>
>Do you mean as in an index-type page or a general rule for the server not to
>serve files above/below size x?
>
>If its the former then you can just do an opendir(), readdir(),is_file(),
>filesize() loop and only display those files that have the appropriate 
>filesize().
>
>And if you also want to filter based on file type you check...
>
>$extension = strrchr(basename($file_name), "."); //get the file extension
>
>and then compare extension to an array of filetypes ('jpeg','jpeg','png', etc)
>in a case insensitive search.
>
>HTH,
>    Gav
>
>--
>* * Please support the community that supports you.  * *
>http://evolt.org/help_support_evolt/
>
>For unsubscribe and other options, including the Tip Harvester
>and archives of thelist go to: http://lists.evolt.org
>Workers of the Web, evolt !

**********************************************
                 John C Bullas  <jcbullas<at>nildram.co.uk
***** Eudora Mail 6.0.0.22  + McAfee Virus Scan 4.5.1 *****
**********************************************



More information about the thelist mailing list