note 44820 added to function.imagepng

From: Date: Tue, 17 Aug 2004 14:49:22 +0000
Subject: note 44820 added to function.imagepng
Groups: php.notes 
Request: Send a blank email to php-notes+get-79884@lists.php.net to get a copy of this message
Having your pictures stored in a database sounds great but brings you a lot of trouble. Storing images in a DB you will have a script show.php that will appear in <img> tags: <img src='show.php?img_id=$some_id'> But if you want to have REGISTER GLOBALS = OFF, you are in trouble and there is no way (at leas as far as i know) to solve the problem but to put te img from the DB in a file and put the coresponding file name in the <img> tag. But this brings another problem: simultaneous accesses to the page. So you will have to find a way to give unique names to the picture files for each simultaneous access to the page. The solution might be using sessions. This is how you end up having a very compleh PHP script for a very simple problem. So, the basic ideea is " do not store your pictures in a blob unless you know exactly what you are doing". ---- Manual Page -- http://www.php.net/manual/en/function.imagepng.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+44820 Delete -- http://master.php.net/manage/user-notes.php?action=delete+44820&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+44820&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#79884) next »