SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
-
Sep 6, 2001, 05:46 #1
Retrieving the file size of a given file
Hi sitepoint,
I have a question about (.zip, .tar, .tar.gz) files. I want to know how you can get the file size of the given file, although I do use mysql to store certain information about the script, NO ACTUAL file is stored in the db, instead that is in a dir. so obviously strlen() would be pointless. I just wanted to know what methods I could use for checking out the file size of the given file.
Thanks, Chris.cgi://www.scriptingx.com - Everything CGI
-
Sep 6, 2001, 05:50 #2
- Join Date
- Mar 2001
- Location
- Medina, OH
- Posts
- 440
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yep. Named, appropriately enough, filesize()
Kevin
-
Sep 6, 2001, 12:53 #3
- Join Date
- Apr 2001
- Location
- My Computer
- Posts
- 2,808
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
if your uploading it via yoru web browser - ie upload script - you could use $uploadedfile_size where $uploadedfile is the name attribute of the file input type in your form. php automatically creates and stores the files size in bytes in that variable.
Bookmarks