1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Rep Power

    Saving a BLOB(Image) to temporary location

    I am saving user's images as blob in database. problem is that after retrieving that blob image,i want to save it in a temporary location of web server and from there i want to apply some business logic. please anybody help me to solve this. Thanks in advance
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Rep Power
    You can use file_put_contents to write data to a file. Basically, get the blob into a string by retrieving it from the database, then write that string into a file. The tempnam function can be used to create a temporary file, the manual page for this function contains an example of that.

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo