Home Backend Development PHP Tutorial phpGACL汉语手册(十)安装

phpGACL汉语手册(十)安装

Jun 13, 2016 am 11:01 AM
admin php smarty

phpGACL中文手册(十)安装

前面已经把phpGACL的概念和如何进行权限控制简单的阐述了一遍,从这一章开始,写的是如何对phpGACL进行安装,安装分两种,基本安装和高级安装,下面我就来作个阐述。
安装
基本安装
1将 .tar.gz 文件解压至你网站的根目录或子目录中,你可以将其重命名为你认为适合的名字。
2你可以用你喜欢的编辑器来编辑 phpgacl/gacl.class.php,gacl.inc.php 文件,并设置其中你将用到的 db_type, db_host, db_user, db_password 和 db_name 变量
现在将phpgacl/admin/gacl_admin.inc.php 文件中保持相同的信息。该文件不仅被安装脚本而且还将被 ACL 管理后台调用。

将两个文件保持相同信息的原因在于 ACL 核心库文件 gacl.class.php 比全部的 API 类文件要小得多,没有必要在你只想调用 acl_check() 文件时包含进全部代码。

在服务器上创建你在 db_name 变量中指定的数据库(以 MySQL 为例)

在浏览器中输入网址 http:// 你的站点 /phpgacl/setup.php 。被要求的表单将被建立在你创建的数据库中。不必担心会看到一堆的输出,如果正常运行的话,你将只会看到成功信息。

现在按照最后在屏幕上出现的建议创建 phpgacl/admin/templates_c 目录。它必须是可以被 WEB 服务器用户写入的。如果你不能做到这一点,那么你将不能使用 CAL 管理!
点击成功安装页面底部的链接或直接在浏览器中输入网址: http://yoursite.net/phpgacl/admin/acl_admin.php

高级安装
重新使用已有 ADOdb 的安装方法
如果你已经使用了 ADOdb ,你可以使 phpGACL 使用该 ADOdb 拷贝。
1编辑 phpgacl/gacl.class.php 文件,将 ADODB_DIR 变量设置为 ADBdb 库所在的目录。
2将 phpgacl/adodb 目录重命名为其它名字如 adodb_x ,然后重新载入网页 phpgacl/admin/acl_admin.php ,以确保其能正常工作。
3删除随 phpGACL 安装的 adodb 目录。


重新使用已安装的 Smarty
1编辑 phpgacl/admin/gacl_admin.inc.php 文件,以便变量 $smarty_dir 和 $smarty_compile_dir 能指向已安装 Smarty 库所在位置,并且 template_c 目录你正在使用。
将 phpGACL 模板目录移至另一个目录(比如上级目录中),调整变量 $smarty_template_dir 使之指向新的位置。当然如果你愿意,你也可以将这些模板移到已存在的模板目录中。
2将 phpgacl/smarty 目录重命名为其他名称(如 smarty_x )并重新载入 phpgacl/admin/acl_admin.php 页,以确保它能正常工作。
3删除随 phpGACL 安装的 smarty 目录


我怎样将phpGACL文件移出网站目录,同时在该目录中留下一个链接以便管理呢?
1进入你的网站根目录
2将phpGACL目录移入你的includes目录,同时创建一个软链接到管理工具目录。
mv phpgacl/ /www/includes_directory
ln -s /www/includes_directory/phpgacl/admin/ gacl
3现在输入网址:http://yoursite.net/gacl/acl_admin.php,进入管理页面。如果页面没有正常显示,请确认你的网站服务器允许在网站目录中存在软链接。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

CakePHP Project Configuration CakePHP Project Configuration Sep 10, 2024 pm 05:25 PM

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

To work on file upload we are going to use the form helper. Here, is an example for file upload.

CakePHP Routing CakePHP Routing Sep 10, 2024 pm 05:25 PM

In this chapter, we are going to learn the following topics related to routing ?

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

CakePHP Creating Validators CakePHP Creating Validators Sep 10, 2024 pm 05:26 PM

Validator can be created by adding the following two lines in the controller.

See all articles