Home > PHP Framework > ThinkPHP > How to hide index.php in tp3

How to hide index.php in tp3

藏色散人
Release: 2023-03-03 10:18:36
Original
1392 people have browsed it

tp3 Method to hide index.php: 1. Find and open the "Application/Common/Conf/config.php" file; 2. Modify "return array('URL_MODEL'=> 2,); "Just turn on REWRITE mode.

How to hide index.php in tp3

#The operating environment of this tutorial: Windows 10 system, thinkphp version 3, Dell G3 computer.

How to hide index.php in tp3?

tp3Hide index.php

Enable REWRITE mode in the Application/Common/Conf/config.php file.

<?php
return array(
    //&#39;配置项&#39;=>&#39;配置值&#39;
    &#39;URL_MODEL&#39;=> 2,
  // URL访问模式,可选参数0、1、2、3,代表以下四种模式:0 (普通模式); 1 (PATHINFO 模式); 2 (REWRITE  模式); 3 (兼容模式)  默认为PATHINFO 模式
 );
Copy after login

Related introduction:

ThinkPHP is an open source lightweight PHP framework born to simplify enterprise-level application development and agile WEB application development.

was first born in early 2006. It was officially renamed ThinkPHP on New Year's Day 2007, and was released under the Apache2 open source agreement. ThinkPHP has been adhering to the simple and practical design principle since its birth. While maintaining excellent performance and minimal code, it also focuses on ease of use. And it has many original functions and features. With the active participation of the community team, it is continuously optimized and improved in terms of ease of use, scalability and performance.

ThinkPHP is a fast, compatible and simple lightweight domestic PHP development framework. It was born in early 2006. It was originally named FCS. It was officially renamed ThinkPHP on New Year's Day in 2007. It is released under the Apache2 open source agreement and transplanted from the Struts structure. It has made improvements and improvements, and also borrowed many excellent foreign frameworks and models, using object-oriented development structure and MVC model, integrating the ideas of Struts and TagLib (tag library), RoR's ORM mapping and ActiveRecord model.

ThinkPHP can support server environments such as windows/Unix/Linux. The official version requires PHP5.0 or above. It supports MySql, PgSQL, Sqlite databases and PDO extensions. The ThinkPHP framework itself has no special module requirements. The specific application system operating environment requirements depend on the modules involved in development.

As an overall development solution, ThinkPHP can solve most needs in application development, because it includes the underlying architecture, compatibility processing, base class library, database access layer, template engine, caching mechanism, and plug-ins Mechanism, role authentication, form processing and other commonly used components, and it is more convenient for cross-version, cross-platform and cross-database transplantation. And each component is carefully designed and perfected, and the application development process only needs to focus on your business logic.

Recommended study: "thinkphp video tutorial"

The above is the detailed content of How to hide index.php in tp3. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template