473,406 Members | 2,956 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Uploaded File - $_FILES['userfile']['name'] is modified

Is there any way to prevent the $_FILES['userfile']['name'] from being
modified by PHP? For instance, if somebody puts
"http://groups-beta.google.com/group/comp.lang.php" in the edit box for
an uploaded file, $_FILES['userfile']['name'] only contains
"comp.lang.php" and gets rid of the rest. I realize that this is a
security measure but in my case I don't want it.

Jul 17 '05 #1
1 2059
*** ralfthewise escribió/wrote (20 Mar 2005 11:55:47 -0800):
Is there any way to prevent the $_FILES['userfile']['name'] from being
modified by PHP? For instance, if somebody puts
"http://groups-beta.google.com/group/comp.lang.php" in the edit box for
an uploaded file, $_FILES['userfile']['name'] only contains
"comp.lang.php" and gets rid of the rest. I realize that this is a
security measure but in my case I don't want it.


$HTTP_RAW_POST_DATA doesn't work in my system so I can't tell you its exact
contents but you might be lucky with it. There's an option to activate it
in php.ini; see also http://natrak.net/node/view/260

In any case, make sure what you want to do really works. I've tried to
upload remote files with Mozilla 1.75 and Explorer 6 and none of them would
allow me.

--
-+ Álvaro G. Vicario - Burgos, Spain
+- http://www.demogracia.com (la web de humor barnizada para la intemperie)
++ No envíes tu dudas a mi correo, publícalas en el grupo
-+ Do not send me your questions, post them to the group
--
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kareem Badr | last post by:
I was having permission problems, so I'm using a test file to make sure uploading works. upload.php successfully uploads a file to the images/bookcovers dir: <html> <form method="post"...
6
by: Ben | last post by:
Hi everybody! I have a multi-file upload form... Please looks at my code below. It's in an initial stage. I'm trying to display the values of each text box when I press "upload" but it doesn't...
7
by: smilesinblues | last post by:
Hi, I have to allow my visitors to upload image on my site. I am using the follwoing code to do that: $uploaddir = 'admin/'; $uploadfile = $uploaddir . basename($_FILES);...
2
by: smilesinblues | last post by:
Hi, I have to allow my visitors to upload image on my site. I am using the follwoing code to do that: $uploaddir = 'admin/'; $uploadfile = $uploaddir . basename($_FILES);...
2
by: Don | last post by:
The following 4 statements don't work. What is the proper way to pickup the filenames corresponding to each of the userfiles in the "input" tags? Thanks for your help. --Don Following is part...
3
by: sumaabey | last post by:
my code <? //include("../mysqlconnect.php"); $link = mysql_connect("localhost","root","") or die("Could not connect: " . mysql_error()); mysql_select_db("suma"); ...
9
by: Jankie | last post by:
<?php if(isset($_POST) && $_FILES > 0){ foreach ($_FILES as $key => $error) { $name = $_FILES; $tempname = $_FILES; ………… ……… $path = 'uploads/'; include 'dbcon.php'; $rep = strpos($_FILES,...
2
by: Muddasir | last post by:
Hi All. Anyone plz tell me how can I upload a file with the file name of my choice. am having problem with this, the file got uploaded but not with the name I wanted to...how can I do this...
9
by: Philth | last post by:
HI there, I had a similar problem yesterday with my delete function. All looks ok, yet doesn't delete. I've tried adding the '$_GET' to the sql query, without any success. Is this perhaps a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.