SitePoint Sponsor

User Tag List

Results 1 to 1 of 1
  1. #1
    SitePoint Member
    Join Date
    Oct 2005
    0 Post(s)
    0 Thread(s)

    Exclamation Upload Photo and Read EXIF Data (unsolved)

    I made a form (index1.php) to upload a photo to a new folder created by the POST (upload.php). Then, in upload.php it logs the photo name in a mySQL database along with the date (from EXIF) and description. When I try to read the EXIF data I get the error:

    Warning: exif_read_data(): unable to open file

    Here's the script (or pieces of it):
    PHP Code:
    //get folder name from post
    $foldername $_POST['foldername'];
    //set destination file name and path
    $pathname $foldername."/".$filenumber.".jpg";
    //get an array with the date from the file
    $datearray exif_read_data($pathname,'FILE');
    //get the timestamp out of the array
    $timestamp $datearray["FileDateTime"];
    //change the timestamp to a readable date and time
    $date date("n/j/y&\\nb\sp;&\\nb\sp;&\\nb\sp;&\\nb\sp;g:ia",$timestamp);
    //save the temp file to destination
    What's going on?!
    Last edited by calebvetter; Oct 11, 2005 at 07:26.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts