Posted by Big Moxy on 08/11/07 12:37
On Aug 10, 9:14 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> Big Moxy wrote:
> > This is stupid but I don't see the problem. I get a blank page when I
> > submit this form. The files that I am using for testing are all less
> > than 50 KB in size.
>
> > Any insight is appreciated!!
>
> > <form enctype="multipart/form-data" action="image_upload.php"
> > method="POST">
> > <table width="100%" border="0" cellpadding="3">
> > <tr>
> > <td> </td>
> > </tr>
> > <tr>
> > <td><!-- The data encoding type, enctype, MUST be specified as
> > below -->
> > <!-- MAX_FILE_SIZE must precede the file input field -->
> > <input type="hidden" name="MAX_FILE_SIZE" value="50000" />
> > <!-- Name of input element determines name in $_FILES array -->
> > Choose a file to upload:
> > <input name="userfile" type="file" size="40" />
> > </td>
> > </tr>
> > <tr>
> > <td align="center"><input type="submit" name="Submit" id="Submit"
> > value="Upload" /></td>
> > </tr>
> > </table>
> > </form>
>
> > Here is image_upload.php -
>
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
> >www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> > <html xmlns="http://www.w3.org/1999/xhtml">
> > <head>
> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
> > <title>Upload Image</title>
> > </head>
> > <?php
> > error_reporting(E_ALL);
> > $uploaddir = "d:\domains\test.com\wwwroot\casper\uploads\";
> > $uploadfile = $uploaddir . basename($_FILES["userfile"]["name"]);
> > if ($_FILES["userfile"]["error"] > 0)
> > {
> > echo "Return Code: " . $_FILES["userfile"]["error"] . "<br />";
> > }
> > else
> > {
> > echo "No errors" . "<br />";
> > echo $uploaddir . "<br />";
> > echo $uploadfile . "<br />";
> > }
> > ?>
> > <body>
> > </body>
> > </html>
>
> I should add - you can also set display_errors in your file with
> ini_set(). However, I recommend the php.ini file because
> error_reporting() and ini_set() don't get executed when you have a fatal
> (i.e. syntax) error.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================- Hide quoted text -
>
> - Show quoted text -
This code is running at my web host so I don't have access to php.ini.
Is there another way?
[Back to original message]
|