File name
| From: | Ben Cairns | Date: | Thu, 16 Nov 2000 09:32:10 +0000 |
| Subject: | File name | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-3888@lists.php.net to get a copy of this message | ||
How do I get the ORIGINAL (the file name on the client machine) of a file
that is uploaded using this script:
<?
for($i=0;$i<sizeof($userfile);$i++)
{
if(!$userfile_size[$i])
continue;
$UPLOAD = fopen( $userfile[$i], "r" );
$contents = fread( $UPLOAD,$userfile_size[$i]);
fclose( $UPLOAD );
$SAVEFILE = fopen(
"/Apache/htdocs/users/$mywapfone_registered//".$userfile_name[$i], "wb" );
fwrite( $SAVEFILE, $contents,$userfile_size[$i] );
fclose( $SAVEFILE );
}
echo "Your file(s) have been uploaded.<BR><BR>";
?>
I want to use line to echo just the filename.ext of the posted file.
-- Ben Cairns, Head Of Technical Operations, Intasept.com
E-Mail: BenC@intasept.com | Web: http://www.intasept.com