Re: directory listing and how to determine file size

From: Date: Mon, 19 Feb 2001 08:27:54 +0000
Subject: Re: directory listing and how to determine file size
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-40544@lists.php.net to get a copy of this message
> I am going to develop virtual file management. Thus I want to know > some things. > 1. how to determine file size _before_ file uploading or on loading > time and how to avoid error message if file size will be too large. You can't determine file size before uploading... *MAYBE* with some funky JavaScript?... > 2. how to read directory content with it's size, modes etc in win32 > and linux. win32 doesn't have modes, really... > 3. in what mode i should make directory for read/write permission > (not execute). Any point to docs? man chmod > 4. Any other useful points to my project? I don't know all problems > for it. Allowing surfers to upload arbitrary files is inherently dangerous. Be very, very careful. Just because a file isn't executable doesn't make it "safe". EG: If you let them upload a readable file that they can trick the browser into showing, and it contains PHP (or Perl, or JSP) code, they can execute *that*, even though it's not executable. I'm sure there are many, many other potential holes. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm

« previous php.general (#40544) next »