Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 154737 Details for
Bug 240143
$_FILE variable is not available (ever) or when executing php upload script
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
PHP Script at the provided URL
listing10.12.php (text/html), 1.35 KB, created by
Ron Askew
on 2007-05-15 14:38:24 UTC
(
hide
)
Description:
PHP Script at the provided URL
Filename:
MIME Type:
Creator:
Ron Askew
Created:
2007-05-15 14:38:24 UTC
Size:
1.35 KB
patch
obsolete
><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" >"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> ><html> ><head> > <title> > Listing 10.12 A File Upload Script > </title> ></head> > ><body> > <div> ><?php > phpinfo(); > print "<pre>\n"; > print_r($_FILES); > print "</pre>\n"; > if (isset($_FILES["fupload"])) { > foreach($_FILES as $key) { > print "\$_FILES[" . $key . "]<br />\n"; > } > print "name: ". $_FILES["fupload"]["name"]. "<br />\n"; > print "size: ". $_FILES["fupload"]["size"]. "<br />\n"; > print "tmp_name: ". $_FILES["fupload"]["tmp_name"]. "<br />\n"; > print "type: ". $_FILES["fupload"]["type"]. "<br />\n"; > print "error: ". $_FILES["fupload"]["error"]. "<br />\n"; > > if ($_FILES["fupload"]["type"] == "image/gif") { > $source = $_FILES["fupload"]["tmp_name"]; > $target = "../upload/".$_FILES["fupload"]["name"]; > $size = getImageSize( $target ); > > $imgstr = "<p><img width=\"$size[0]\" height=\"$size[1]\" "; > $imgstr .= "src=\"$target\" alt=\"uploaded image\"></p>"; > > print $imgstr; > } > } >?> > <br /> > <form enctype="multipart/form-data action="<?php print $_SERVER["PHP_SELF"];?>" method="POST"> > <p> > <input type="hidden" name="MAX_FILE_SIZE" value="<?php print 1024*1024;?>"> > <input type="file" name="fupload"><br /> > <input type="submit" value="Upload!"> > </p> > </form> > </div> ></body> ></html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title> Listing 10.12 A File Upload Script </title> </head> <body> <div> <?php phpinfo(); print "<pre>\n"; print_r($_FILES); print "</pre>\n"; if (isset($_FILES["fupload"])) { foreach($_FILES as $key) { print "\$_FILES[" . $key . "]<br />\n"; } print "name: ". $_FILES["fupload"]["name"]. "<br />\n"; print "size: ". $_FILES["fupload"]["size"]. "<br />\n"; print "tmp_name: ". $_FILES["fupload"]["tmp_name"]. "<br />\n"; print "type: ". $_FILES["fupload"]["type"]. "<br />\n"; print "error: ". $_FILES["fupload"]["error"]. "<br />\n"; if ($_FILES["fupload"]["type"] == "image/gif") { $source = $_FILES["fupload"]["tmp_name"]; $target = "../upload/".$_FILES["fupload"]["name"]; $size = getImageSize( $target ); $imgstr = "<p><img width=\"$size[0]\" height=\"$size[1]\" "; $imgstr .= "src=\"$target\" alt=\"uploaded image\"></p>"; print $imgstr; } } ?> <br /> <form enctype="multipart/form-data action="<?php print $_SERVER["PHP_SELF"];?>" method="POST"> <p> <input type="hidden" name="MAX_FILE_SIZE" value="<?php print 1024*1024;?>"> <input type="file" name="fupload"><br /> <input type="submit" value="Upload!"> </p> </form> </div> </body> </html>
View Attachment As Raw
Actions:
View
Attachments on
bug 240143
: 154737