Jump to content

hujh2012

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

hujh2012's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Does anyone know what would cause this error: Notice: Undefined index: file in C:\Inetpub\wwwroot\Upload\uploader3.php on line 2 No file specified with these files for uploading images: uploader.htm <html><head><title>File Uploader</title></head> <body><h3>File Upload</h3> Select a file to upload:<br> <form action="uploader.php" method="post" enctype="multipart/form-data"> <input type="file" name="file" size="45"> <br> <input type="submit" value="Upload File"> </form> </body></html> and, uploader.php <?php if( $_FILES['file']['name'] != "" ) { copy ( $_FILES['file']['tmp_name'], "C:/Inetpub/wwwroot/Upload/" . $_FILES['file']['name'] ) or die( "Could not copy file" ); } else{ die( "No file specified" ); } ?> <html> <head><title>Upload Complete</title></head> <body> <h3>File Upload Succeeded...</h3> <ul> <li>Sent: <?php echo $_FILES['file']['name']; ?> <li>Size: <?php echo $_FILES['file']['size']; ?> bytes <li>Type: <?php echo $_FILES['file']['type']; ?> </ul> <a href="<?php echo "C:/Inetpub/wwwroot/Upload/".$_FILES['file']['name']; ?>"><img src="<?php echo "C:/Inetpub/wwwroot/Upload/".$_FILES['file']['name']; ?>" height="200"></a> </body> </html> Thanks!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.