Re: [nyphp-talk] opening files

2007-10-26 Thread Ben Sgro (ProjectSkyLine)
Hello, Here's some code I'm using to store user's avatars. I have the paths' mapped to defines. It removes the original image and converts to png (which is hardwired) and then saves JUST the filename to the database (since I know the path, DEFINE). I use the PEAR FileUpload( ) Class to take

RE: [nyphp-talk] opening files

2007-10-26 Thread Anthony Wlodarski
I believe the simple way would to be to store a path in a database. Here is an example of an upload procedure to add files to the directory (must be world writeable though and does not provide for mime types, just extension checks since mime_content_type() and PEAR extensions might not be an optio

Re: [nyphp-talk] opening files

2007-10-26 Thread David Krings
ali mohammad wrote: Putting image paths in a database would only work if you know beforehand the path and name of all the images you want displayed (not to mention the unreasonable overhead of updating that database for additional images added or existing image files renamed later on). What you