|
Posted by Jerry Stuckle on 09/15/05 19:49
vaudry@myrealbox.com wrote:
> Hi knowledgeable people.
>
> Context
> -------
> I'm building a very basic website, in php, to display a catalog of
> jewel to be sold. The website have to basic functionality, one is the
> consultation of the catalog and the other one is the maintenance of the
> catalog. I have a MySQL ddatabase that contain the catalog, except the
> images, which are keep in a directory.
>
> website structure
>
> .\ PHP scripts to consult catalog.
> .\images Image of the catalog jewel.
> .\admin PHP scripts to maintain information. Password protected
> directory.
>
>
> I have a share hosting, the web-server run under Apache and I cannot
> create new Apache user.
>
> Problem
> ---------
> I have one directory where I store all the image of the catalog. I need
> to allow everybody to consult it in order to display the image, but
> only authorized user should be able to create,update and delete images
> in it.
>
>
> I need some help the basic way to protect this using PHP script, if
> possible?
>
>
> Anybody have an idea?
>
> Francis
>
Francis,
Apache's security can do this for you. Look up .htaccess in the Apache
doc. Even though you're using shared hosting, you probably have
..htaccess enabled. And your control panel may even have a way to create
and maintain the file.
Much easier to use existing functions for this than to write your own code.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|