php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35883 FILENAME PROBLEM
Submitted: 2006-01-03 13:03 UTC Modified: 2006-01-03 14:11 UTC
From: xfuture00 at hotmail dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 5.1.1 OS: WINXP_PRO
Private report: No CVE-ID: None
 [2006-01-03 13:03 UTC] xfuture00 at hotmail dot com
Description:
------------
Well... I try to search around the solution for this problem..
no matter Advanced search in bugs.php.net
or google...

I found $_FILES unable to get files with space between the filename
like "ab c.txt" or "my files.txt"


Reproduce code:
---------------
My Form:
<form method="POST" enctype="multipart/form-data" action="xxx.php"; ?>" name='addfileform'>
<input type="file" name="filename" size="64" maxlength="255" class="" >

My PHP:
$myFile = $_FILES['filename'];
$source_file = $myFile['tmp_name'];
$destination_file = "**some location**";

$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);

Expected result:
----------------
I expect the upload can be successfully as the file that WITHOUT space between the file name...

Actual result:
--------------
the result return filename is an Undefined Index..

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-03 13:06 UTC] xfuture00 at hotmail dot com
Well.. as for extra information..
my script is working well with files without SPACES between their filename...
 [2006-01-03 13:07 UTC] tony2001@php.net
var_dump($_FILES); will help you to see its values.
 [2006-01-03 13:57 UTC] xfuture00 at hotmail dot com
the var_dump($_FILES)
return me this...
array(0) { }
 [2006-01-03 14:07 UTC] xfuture00 at hotmail dot com
erm.. I think that's my file problem..
i tried with another file with SPACE between the filename..
IT WORKS!

I dunno what's happen to this file...
the content inside does affect the upload procedure?
 [2006-01-03 14:11 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 17:01:29 2024 UTC