search
HomeCMS TutorialPHPCMSHow to implement background access restrictions in phpcms

How to implement background access restrictions in phpcms

File path:/caches/config/system.php

Modification method:

Modification:

'admin_url' => ''

For example: the domain name that needs to be bound to the backend is a8800.phpip.com, then we can only access the backend through http://a8800.phpip.com/admin.php.

So this should be changed to:

'admin_url' => 'a8800.phpip.com',

Bind the domain name: a8800.phpip.com to the same directory as the website.

The a8800 here is any domain name, the more complex the better.

Function implementation method:

File:/phpcms/modules/admin/classes/admin.class.php

if(pc_base::load_config('system','admin_url') && $_SERVER["HTTP_HOST"]!= pc_base::load_config('system','admin_url')) {
                        Header("http/1.1 403 Forbidden");
                        exit('No permission resources.');
                }

Related Recommended: phpcms tutorial

The above is the detailed content of How to implement background access restrictions in phpcms. For more information, please follow other related articles on the PHP Chinese website!

Statement
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

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment