note 27234 added to function.is-uploaded-file
| From: | itadmin at itmusicweb dot co dot uk | Date: | Thu, 28 Nov 2002 12:11:09 +0000 |
| Subject: | note 27234 added to function.is-uploaded-file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-40071@lists.php.net to get a copy of this message | ||
The example brought out does not work as supposed to:
function is_uploaded_file($filename) {
if (!$tmp_file = get_cfg_var('upload_tmp_dir')) {
$tmp_file = dirname(tempnam('', ''));
}
$tmp_file .= '/' . basename($filename);
/* User might have trailing slash in php.ini... */
return (ereg_replace('/+', '/', $tmp_file) == $filename);
}
It works only with files under ....4 or 5 kb, other files automatically get the size of 0 bytes. So
something must be wrong here. Built-in is_uploaded_file() works good.
--
http://www.php.net/manual/en/function.is-uploaded-file.php
http://master.php.net/manage/user-notes.php?action=edit+27234
http://master.php.net/manage/user-notes.php?action=delete+27234
http://master.php.net/manage/user-notes.php?action=reject+27234