Re: filesize() and mime_content_type()

From: Date: Sat, 09 Jun 2007 00:10:13 +0000
Subject: Re: filesize() and mime_content_type()
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-256417@lists.php.net to get a copy of this message
On Thu, June 7, 2007 12:04 pm, Chris Boget wrote: >> Have you uncommented or added >> extension=php_mime_magic.dll in >> your php.ini file for mime_content_type()? What about adding >> something like this, as well: > > extension=php_mime_magic.dll is commented out in my php.ini. So that > explains why the mime_content_type() isn't working. That's fine. Is > this > DLL also responsible for filesize()? > >> Do you have anything in the disable_functions = area of >> your >> php.ini? > > No, there are no disabled functions definined in my php.ini. The fact that filesize is "failing" and stat is "failing" when you give a specific filename suggests to me that your filename is at fault. Try things like: echo file_exists($filename); // if it's there, it should be TRUE $path = dirname($filename); $dir = opendir($path) or die("$path is not there\n"); while (($file = readdir($dir)) !== false){ echo $file, ": ", filesize("$path/$file"), "<br />\n"; } This will list all the files in the directory -- which may not be the directory you think you are looking at, ESPECIALLY if you are using relative directories. > > thnx, > Chris > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#256417) next »