Hello all!

I have a few questions about putting images into the database. I have chosen to put the images on my server and then the location will be put in the database, instead of doing the blog thing. However, I am having a hard time trying to figure out how to do this and where on my server I should place these files. I was told awhile back that through php I can even create files to put these images in if they are different clients. I'm clueless on how to do it.

Also, the program I'm using to build my software keeps shutting down and doing weird stuff because the web pages are too large. The creator of the software told me it would be wise to store the webpages into the database and then online pull them from the database. Is this done the same way that the images are done?

Thanks to all who can help :)
~Amy

Re: images & web pages into db 80 80

First part.
You are going the right route by storing files on the server and paths in the database. You should create a main image directory and possiblty have your images table have a subpath off of that. I'm sure each row will have an 'owner' or client column, so each client can have its own subfolder for images. Then each client, will have a house id lets say. So you can use something like this
/images/clientid/houseid/imagename.jpg

Second part.
This will work a little different. You will only want to load content, and not necessarily the entire webpage from the database.

If you can be a little more clear from the second part feel free.

Re: images & web pages into db 80 80

Hmmm...I'm still having a hard time following the first part. I'm trying to find the right place on my server to store them. Does it really matter where? For instance, I read in a php book that my httpdocs and uploads folder should be separate and the uploads folder is where I should store my uploads. Does this sound right? When I look on my server, however, the uploads folder is inside of the httpdocs file. Do you know the difference?

2nd part-okay, so pretty much the images from the website will be stored the same way and then I'll just write the php code on the static pages to pull at will?

Thanks,
~Amy

Re: images & web pages into db 80 80

Assuming you are using apache, here's a guide to setting up a virtual directory in apache

http://forums.htmlcenter.com/servers/2879-creating-virtual-directory-apache.html

I would recommend to set up possibly inside the uploads directory, you just want to be sure that permissions on this images directory aren't able to access your other directories, because you are allowing users to write to them.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.