Re: Current dilema for Novice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



James Marcinek wrote:
> - New directories may be created by various individuals

Who?
How?
How do you know they are who they say they are, and that they *SHOULD* be
allowed?

> - provide security for each directory (and sub-directory) under
> $_SERVER['DOCUMENT_ROOT'].

What does this even mean?

You've got no real definition here for what you actually want.

Security against what action from whom under what circumstances?

And who is supposed to be allowed when?

> - Use parent directory of each .htm file (since there will be only one) as
> the
> name of the link to the file

But what's to stop two users from making a sub-sub-directory named 'admin'
and then you recursively visit them, and find a file 'foo.htm' and they
are both in 'admin'?

> - Prevent displaying of other directories under $_SERVER['DOCUMENT_ROOT']

Which "other" directories?
Which ones are kosher, which are not?

> - Each site is currently configured to use Apache Digest Authentication.

Check browser implementations and compatibility...

Not sure they all ever got around to implementing that.

> My
> experience with PHP site design comes from the book 'PHP and MySQL Web
> Development' which mainly dealt with web sites as Applications
> (e-commerce,
> blog, etc) and not from a file system stand point. Most was object
> oriented with
> includes and what not which would require pages in every subdirectory
> under the
> DOCUMENT_ROOT in order to comply with the application design. Having a
> solution
> to require this would not be practical; however I'm not sure if there's
> another
> way to approach.

In php.ini you could set an "append" file that every site would get that
has all the PHP in it you want them to have on every page.

> If anyone has any suggestions (and estimations of time it would take) I
> would
> appreciate it.

The rest of this stuff is your basic PHP directory functions:
http://php.net/opendir
http://php.net/readdir
and then using arrays and recursion to keep track of where you are and
what you want to show the user.
You should be able to find sample code for all that in the PHP Manual and
its User Contributed notes, or Google if all else fails.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux