常量
<h1>绝对路径</h1>
<ul>
<li><strong>P_IN</strong>:  项目入口文件所在的目录</li>
<li><strong>P_LOG</strong>:  日志文件目录</li>
<li><strong>P_PUBLIC</strong>:  项目public目录</li>
<li><strong>P_CORE</strong>:  框架core目录</li>
<li><strong>P_ROOT</strong>:  项目根目录</li>
<li><strong>P_COMMON</strong>:  项目common目录</li>
<li><strong>P_TMP</strong>:  项目临时文件目录</li>
<li><strong>P_APP</strong>:  当前的应用目录</li>
<li><strong>P_MODULE</strong>:  当前的模块目录</li>
<li>
<p><strong>P_BASE</strong>:  当前应用或者模块的 base 目录</p>
</li>
<li><strong>P_RES</strong>:  项目资源目录</li>
<li><strong>P_RES_APP</strong>:  当前应用的资源目录</li>
<li><strong>P_RES_VER</strong>:  当前应用版本的资源目录</li>
<li>
<p><strong>P_RES_MODULE</strong>:  当前模块的资源目录</p>
</li>
<li><strong>P_RUN</strong>:  项目运行目录</li>
<li><strong>P_RUN_APP</strong>:  当前应用的运行目录</li>
<li><strong>P_RUN_VER</strong>:  当前应用版本的运行目录</li>
<li>
<p><strong>P_RUN_MODULE</strong>:  当前模块的运行目录</p>
</li>
<li><strong>P_HTML</strong>:  项目html缓存目录</li>
<li><strong>P_HTML_APP</strong>:  当前应用的html缓存目录</li>
<li><strong>P_HTML_VER</strong>:  当前应用版本的html缓存目录</li>
<li>
<p><strong>P_HTML_MODULE</strong>:  当前模块的html缓存目录</p>
</li>
<li><strong>P_CACHE</strong>:  项目缓存目录</li>
<li><strong>P_CACHE_APP</strong>:  当前应用的缓存目录</li>
<li><strong>P_CACHE_VER</strong>:  当前应用版本的缓存目录</li>
<li>
<p><strong>P_CACHE_MODULE</strong>:  当前模块的缓存目录</p>
</li>
<li><strong>P_VIEW_APP</strong>:  当前应用版本的模板目录</li>
<li>
<p><strong>P_VIEW_MODULE</strong>:  当前模块的模板目录</p>
</li>
<li><strong>P_THEME_APP</strong>:  当前应用版本的模板风格目录</li>
<li>
<p><strong>P_THEME_MODULE</strong>:  当前模块的模板风格目录</p>
</li>
<li><strong>P_RES_</strong>:  当前的资源目录  <font color=red>下划线结尾</font> <strong>[有模块功能就是模块的资源目录否则就是应用版本的资源目录]</strong></li>
<li><strong>P_RUN_</strong>:  当前的运行目录  <font color=red>下划线结尾</font> <strong>[有模块功能就是模块的运行目录否则就是应用版本的资源目录]</strong></li>
<li><strong>P_HTML_</strong>:  当前的html缓存目录  <font color=red>下划线结尾</font> <strong>[有模块功能就是模块的html缓存目录否则就是应用版本的html缓存目录]</strong></li>
<li><strong>P_CACHE_</strong>:  当前缓存目录  <font color=red>下划线结尾</font> <strong>[有模块功能就是模块的缓存目录否则就是应用版本的缓存目录]</strong></li>
<li><strong>P_VIEW_</strong>:  当前模板目录  <font color=red>下划线结尾</font> <strong>[有模块功能就是模块的模板目录否则就是应用版本的模板目录]</strong></li>
<li><strong>P_THEME_</strong>:  当前模板风格目录  <font color=red>下划线结尾</font> <strong>[有模块功能就是模块的模板风格目录否则就是应用版本的模板风格目录]</strong></li>
</ul>
<h1>相对路径</h1>
<ul>
<li><strong>U_ROOT</strong>:  URL的根路径  <strong>[结尾无“/”]</strong></li>
<li><strong>U_HOME</strong>:  URL的根路径  <strong>[结尾有“/”]</strong></li>
<li><strong>U_TMP</strong>:  临时目录的URL路径 (public目录下的tmp)</li>
<li><strong>U_RES</strong>:  资源目录的URL</li>
<li><strong>U_RES_APP</strong>:  当前应用资源目录的URL</li>
<li><strong>U_RES_VER</strong>:  当前应用版本资源目录的URL</li>
<li><strong>U_RES_MODULE</strong>:  当前模块资源目录的URL</li>
<li><strong>U_RES_</strong>:  当前资源目录的URL  <font color=red>下划线结尾</font> <strong>[有模块功能就是模块资源目录的URL,否则就是应用版本资源目录的URL</strong></li>
</ul>
<h1>其它常量</h1>
<ul>
<li><strong>ZPHP_OS</strong>:  操作系统(只有WINDOWS和LINUX)</li>
<li><strong>ZPHP_VER</strong>:  框架版本号</li>
<li><strong>PHP_FILE</strong>:  入口文件名</li>
<li><strong>VER</strong>:  项目的版本号</li>
<li><strong>TIME</strong>:  请求时间(秒)</li>
<li><strong>MTIME</strong>:  请求时间(微秒)</li>
<li><strong>THEME</strong>:  模板风格</li>
<li><strong>TPL_EXT</strong>:  模板文件的扩展名</li>
<li><strong>METHOD</strong>:  请求方式</li>
<li><strong>APP_NAME</strong> :  应用名</li>
<li><strong>IS_AJAX</strong>:  是否ajax请求</li>
<li><strong>IS_WX</strong>:  是否微信浏览器</li>
<li><strong>ROUTE</strong>:  当前请求的路由信息 <strong>[数组,结构见下面]</strong></li>
<li><strong>DATA</strong>:  当前请求提交的数据 <strong>[数组,结构见下面]</strong></li>
</ul>
<p><strong>ROUTE 结构:</strong></p>
<table>
<thead>
<tr>
<th>key</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>module</td>
<td>string</td>
<td>模块名 (启用了模块的情况下,否则无此字段)</td>
</tr>
<tr>
<td>ctrl</td>
<td>string</td>
<td>控制器名</td>
</tr>
<tr>
<td>act</td>
<td>string</td>
<td>操作名</td>
</tr>
<tr>
<td>path</td>
<td>array</td>
<td>pathinfo部分拆分为数组</td>
</tr>
<tr>
<td>params</td>
<td>array</td>
<td>pathinfo或路由模式传递的参数</td>
</tr>
<tr>
<td>query</td>
<td>array</td>
<td>包含 params 和 $_GET</td>
</tr>
<tr>
<td>uri</td>
<td>string</td>
<td>请求的uri</td>
</tr>
</tbody>
</table>
<p><strong>DATA 结构:</strong> <font color=red>[字段根据请求类型而变,下面只是举例]</font></p>
<table>
<thead>
<tr>
<th>key</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>INPUT</td>
<td>string</td>
<td>未知类型的提交数据</td>
</tr>
<tr>
<td>PUT</td>
<td>-</td>
<td>PUT操作提交的数据</td>
</tr>
<tr>
<td>DELETE</td>
<td>-</td>
<td>DELETE操作提交的数据</td>
</tr>
<tr>
<td>PATCH</td>
<td>-</td>
<td>PATCH操作提交的数据</td>
</tr>
</tbody>
</table>