Explore Enterprise Education Gitee Premium Gitee AI AI teammates
Fetch the repository succeeded.
Donate
Please sign in before you donate.
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
1 Star 0 Fork 1

小程序开发/modphp

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
Already have an account? Sign in
文件
master
Branches (1)
master
master
Branches (1)
master
Clone or Download
Clone/Download
Prompt
To download the code, please copy the following command and execute it in the terminal
To ensure that your submitted code identity is correctly recognized by Gitee, please execute the following command.
When using the SSH protocol for the first time to clone or push code, follow the prompts below to complete the SSH configuration.
1 Generate RSA keys.
2 Obtain the content of the RSA public key and configure it in SSH Public Keys
To use SVN on Gitee, please visit the usage guide
When using the HTTPS protocol, the command line will prompt for account and password verification as follows. For security reasons, Gitee recommends configure and use personal access tokens instead of login passwords for cloning, pushing, and other operations.
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # Private Token
master
Branches (1)
master
modphp
/
index.php
modphp
/
index.php
index.php 1.55 KB
Copy Edit Raw Blame History
A-yon authored 2017年07月04日 20:03 +08:00 . Update via git
<?php
// ModPHP 压缩包名称,如果设置,ModPHP 将从 ZIP 中加载内核
defined('MOD_ZIP') or define('MOD_ZIP', '');
/** PHP 内置服务器,使用 php -S 0.0.0.0:80 index.php 的方式开启服务器 */
if(PHP_SAPI == "cli-server"){
$dir = realpath($_SERVER["DOCUMENT_ROOT"]).DIRECTORY_SEPARATOR;
$file = explode("?", $_SERVER["REQUEST_URI"]);
$file = lcfirst($dir.urldecode(substr($file[0], 1)));
if(!file_exists($file)){
$_SERVER["SCRIPT_FILENAME"] = $dir."index.php";
}elseif($file != lcfirst(__FILE__) && $file != lcfirst(__DIR__.DIRECTORY_SEPARATOR)){
return false;
}
unset($dir, $file);
}
require_once (MOD_ZIP ? 'zip://'.__DIR__.'/'.MOD_ZIP.'#' : '').'mod/common/init.php'; //引入初始化程序
/**
* 模板加载说明:
* 默认地,ModPHP 会通过模板入口文件(index.php)来调用模板目录中对应的文件。
* 但只有当访问的路径不是一个真实的文件或目录时,ModPHP 才会这么做。
* 例如 http://localhost/something, ModPHP 的访问顺序是这样的:
* 1. 尝试仿问站点根目录下的 something 文件或文件夹;
* 2. 尝试访问模板目录下的 something 文件夹,如果存在这个文件夹,则尝试访问目录下的
* index.php, index.html, index.htm 文件,不存在这些文件则报告 403 错误;
* 3. 尝试访问模板目录下的 something 文件;
* 4. 尝试访问模板目录下的 something.php 文件;
* 5. 尝试匹配模块记录的自定义链接;
* 6. 尝试匹配伪静态规则;
* 7. 没有查询到模板,报告 404 错误。
*/
Loading...
Report
Report success
We will send you the feedback within 2 working days through the letter!
Please fill in the reason for the report carefully. Provide as detailed a description as possible.
Please select a report type
Cancel
Send
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

About

ModPHP 应用程序框架充分继承 PHP 简单强大的特点,体积仅 200KB 多,但包含了丰富的函数库和类库,支持邮件事务、图像处理、编译模板引擎和 WebSocket 等流行和
Cancel

Releases

No release

Contributors

All

Activities

can not load any more
Edit
About
Homepage
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/exphp/modphp.git
git@gitee.com:exphp/modphp.git
exphp
modphp
modphp
master
Going to Help Center

Search

Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register

AltStyle によって変換されたページ (->オリジナル) /