Ad Widget

Collapse

Using php to insert image???

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phuthinhbk
    Junior Member
    • Feb 2015
    • 9

    #1

    Using php to insert image???

    Hello guys!

    I had a png image. I used the code below (PHP) to insert it to `images`:
    Code:
    $url=<source of the image>;
    $content=file_get_contents($url);
    $sql="INSERT INTO `images`(`imageid`, `imagetype`, `name`, `image`) VALUES ('200','2','myImage','$content')"; 
    $mysqli_query($link,$sql);
    No error has occurred but then zabbix couldn't display it.

    I don't know why and don't know how zabbix store image in its database as BLOB?

    Thank you!
Working...