You are here: Re: [PHP] Current dilema for Novice « PHP « IT news, forums, messages
Re: [PHP] Current dilema for Novice

Posted by Richard Lynch on 03/01/05 23:23

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация