使用php / mysql生成菜单页面? [英] use php/mysql to generate menu pages?

查看:73
本文介绍了使用php / mysql生成菜单页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


是否有可能使用php为那些

有权访问不同文件夹中文件的用户生成不同的菜单?


例如,用户Fred可能能够访问文件夹A,B

和F中的文件,而使用Jane可能能够访问文件夹A,D中的文件

和E.我希望每个用户只能看到与他们选择的文件夹中的文件相关的文本和链接...


mysql可以保存php然后用来创建页面的数据吗?


干杯


Geoff

Hello,

Is it possible to use php to generate different menus for users who
have access to files in different folders?

For example, user Fred might be able to access files in folders A, B
and F, whilst use Jane might be able to access files in folders A, D
and E. I would want each user to only see text and links relevant to
the files in their chosen folders...

Can mysql hold data which php then uses to create the pages?

Cheers

Geoff

推荐答案

是。


2008年8月8日星期五15:10:23 -0700(PDT),macca

< pt ******* @ googlemail.comwrote:
On Fri, 8 Aug 2008 15:10:23 -0700 (PDT), macca
<pt*******@googlemail.comwrote:

>是的。
>yes.



再多一点信息将不胜感激!


干杯


Geoff

just a little more info would be appreciated!

Cheers

Geoff


.. oO(Geoff Cox)
..oO(Geoff Cox)

>周五,2008年8月8日15:10 :23 -0700(PDT),macca
< pt ******* @ googlemail.comwrote:
>On Fri, 8 Aug 2008 15:10:23 -0700 (PDT), macca
<pt*******@googlemail.comwrote:

>>是的。
>>yes.


只是多一点信息将不胜感激!


just a little more info would be appreciated!



答案是恰当的。 ;)

你的问题有点过于笼统,无法给出更具体的答案。


当然你可以使用一些基于数据库的用户管理,在某些地方表

它存储了允许用户访问的文件夹。这些文件夹

应该放在文档根目录之外,以避免直接访问URL,但是他们的内容只能由脚本读取。然后,这个

脚本必须根据数据库中的规则检查当前登录的

用户的权限。使用会话也很有帮助

这里也是。


但是简单的HTTP身份验证就足够了吗?使用.htaccess文件可以非常轻松地控制访问

到各种文件夹。

课程PHP解决方案可能更方便,更容易维护。


Micha

The answer was appropriate. ;)
Your questions are a bit too general to give more specific answers.

Of course you can use some DB-based user management, where in some table
it is stored what folders the users are allowed to access. These folders
should be placed outside the document root to avoid direct URL access,
but instead their contents should only be readable by a script. This
script then just has to check the privileges of the currently logged-in
user, according to the rules in the DB. Using sessions would be helpful
here as well.

But maybe simple HTTP Authentication would be enough? Controlling access
to the various folders can be done quite easily with .htaccess files. Of
course a PHP solution might be more convenient and easier to maintain.

Micha


这篇关于使用php / mysql生成菜单页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆