What I am trying to accomplish is the first step in taking an image from a file and storing it in PostgreSQL.
The first part of this project is to be able to load the file into a string and use the "imagecreatefromfunction" to display the picture. That function ensures that I have loaded the picture and it is displayable.
My problem is that this function is outputting nothing. No error, nothing. The code does process, that I know. Does anyone know what I am doing wrong?
<?
$filename = "Sample.jpg";
$fp = fopen($filename, "r"
while(!feof($fp))
{
$data = $data . fread($fp, 1);
}
fclose($fp);
imagecreatefromstring($data);
?>
The next step will be to use the PostgreSQL functions to write the string to the large object.
Gary
gwinn7
A+, Network+
The first part of this project is to be able to load the file into a string and use the "imagecreatefromfunction" to display the picture. That function ensures that I have loaded the picture and it is displayable.
My problem is that this function is outputting nothing. No error, nothing. The code does process, that I know. Does anyone know what I am doing wrong?
<?
$filename = "Sample.jpg";
$fp = fopen($filename, "r"
while(!feof($fp))
{
$data = $data . fread($fp, 1);
}
fclose($fp);
imagecreatefromstring($data);
?>
The next step will be to use the PostgreSQL functions to write the string to the large object.
Gary
gwinn7
A+, Network+