I'm creating a file manager application, from which I want the user to be
able to edit/view files.
On the text side of things, it's pretty easy, however from the image side of
things, I'm not sure how to allow the user to view files outside of the web
folder.
Doing a readfile ($file_location)
James Nunnerley wrote:
I'm creating a file manager application, from which I want the user to be
able to edit/view files.
On the text side of things, it's pretty easy, however from the image side of
things, I'm not sure how to allow the user to view files outside of the web
folder.
Doing a
On 5/5/06, James Nunnerley [EMAIL PROTECTED] wrote:
Doing a readfile ($file_location) outputs the binary... can someone point
me in the direction of being able to translate that binary into a viewable
image file?
Drop the appropriate content-type header:
header('Content-type: image/png');
I want to asssign an image to a variable and show it if certain conditions
are met. E.g
If condition is met
{
$myimage= retrieve image (images/myimage.jpg)
echo $myimage
}
Have not used image creation before with php just dipping my toe in the
water.
Thanks
R.
--
PHP General Mailing
I want to asssign an image to a variable and show it if certain conditions
are met. E.g
If condition is met
{
$myimage= retrieve image (images/myimage.jpg)
echo $myimage
}
Have not used image creation before with php just dipping my toe in the
water.
Not sure you need to use image
HI,
I want to show an image from a database but to do that I am using :
$result = @mysql_query($sql);
$data = @mysql_result($result, 0, PICTURE);
$type = @mysql_result($result, 0, FILETYPE);
Header(Content-type: $type);
echo $data;
how about something like,
$result = @mysql_query($sql);
$data = @mysql_result($result, 0, PICTURE);
$type = @mysql_result($result, 0, FILETYPE);
$comment = @mysql_result($result, 0, COMMENT);
Header(Content-type: $type);
echo $data . br . $comment;
or, instead of using Header, create a
7 matches
Mail list logo