Jump to content

oliver9523

Members
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About oliver9523

  • Rank
    Newbie
  • Birthday 01/26/1985

Previous Fields

  • Languages
    C, VB, PHP

Contact Methods

  • MSN
    oliver9523@hotmail.com
  • Website URL
    http://picasaweb.google.com/oliver9523
  • ICQ
    0

Profile Information

  • Location
    UK
  • Interests
    Computers, Electronics, Photography
  1. ah awesome, it was upload_max_filesize set to 2MB. Thanks for the help!
  2. just had a look in my php.ini and this is what's in there ;Maximum size of POST data that PHP will accept.post_max_size = 8M that's the default as of installing it, i've not edited it.edit: The .jpg files i'm testing it with don't go over 3MB.
  3. yeah this is what my form looks like <form action="upload_file.php" method="post"enctype="multipart/form-data"><label for="file">Filename:</label><input type="file" name="file" id="file"/> <br /><br /><input type="submit" name="submit" value="Upload" /></form>
  4. when doing print_r($_FILES); the output is the following...Array ( [file] => Array ( [name] => DSC_1496.jpg [type] => [tmp_name] => [error] => 1 => 0 ) )
  5. i've just tried the following... echo $_FILES["file"]["tmp_name"] . "<br />";echo $_FILES["file"]["name"] . "<br />";echo $_FILES["file"]["type"] . "<br />";echo $_FILES["file"]["size"] . "<br />"; the output when i uploaded a DSLR image wasDSC_2500.jpg0So tmp_name, type and size don't work properly, it works fine for other image files.I was thinking that i might use the exif function something like this exif_imagetype($_FILES["file"]["tmp_name"]) but the tmp_name doesn't work, can anybody give an example of how it's used?
  6. hi, i've been following the tutorials on this site for PHP and i've got the bit about filtering out files to upload. Tutorial. (sorry in advace for the long post, i don't want to leave anything out just incase)This is the example code... <?phpif ((($_FILES["file"]["type"] == "image/gif")|| ($_FILES["file"]["type"] == "image/jpeg")|| ($_FILES["file"]["type"] == "image/pjpeg"))&& ($_FILES["file"]["size"] < 20000)) { if ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"] . "<br />"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br />
×
×
  • Create New...