<?php
//this example uses class Shref_ImgInDb to save an image to data base
// first we included the class in the file
require_once "Shref.ImgInDb.class.php" ;
//then created a new object
$Shref = new Shref_ImgInDb() ;
//**conected to the data base
// user : root
// pass :
// db name : test
$Shref->conDb("root","","test");
//added the image to the data base
//the image path : linux.jpg
//the table in data base that we will save the image in : imageData
//the column where we will save the image : image
$Shref->addImage("linux.jpg", "imageData", "image");
?>
|