PHP框架queryphp教程:入门九 怎么去掉index.php
PHP框架queryphp教程:入门九 如何去掉index.php
去除index.php测试
C:\WINDOWS\system32\drivers\etc\hosts文件添加一行
内容如下
192.168.0.10的是你自己apache使用的IP,就是下面
*号中的IP,反证能访问你的本地网卡就可以了
配置后希望可以变成这样子
记得在inc.ini.php文件里面加多一行
$config['html']='.html'; 或把前面那个//去掉,这样就可以了
虚拟主机配置测试,AllowOverride FileInfo 将会使用.htaccess配置
虚拟主机配置测试文件在apache虚拟主机里面:
.htaccess文件 放在project目录下面 就是每个项目目录下面,这样就会访问同级目录
index.php文件
index.php 目录下.htaccess文件:
------------------------
程序中使用url_for()方式
模板中示示例 我们还是以CURD方式?
下载后在并在apache设置www.app.com 在c:/windows/system
是不是可以显示内容了
如果显示了 在framework\config\inc.ini.php 文件中把下面这行内容去掉注释
http://www.tjwzjs.cn/queryphp/project/curd/index.html 访问
是不是可以看到内容了
所有链接都带.html结尾了。那我们有时候想不要.html结尾怎么办
url_for(url,true);方式 表示不要html结尾
删除会变成这样子

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

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

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

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

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

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

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

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

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
