LNMP On Linux 模块加载失败

浏览:552 发布日期:2013/09/23 分类:求助交流 关键字: 模块 加载失败
LNMP安装后的路径:/home/wwwroot/default
创建了目录dbi
在dbi目录下建立文件index.php,内容如下:
<?PHP
define('APP_NAME','dbi');
define('APP_PATH','./dbi/');
define('APP_DEBUG',true);
require './ThinkPHP/ThinkPHP.php';

测试http://127.0.0.1/dbi/
显示欢迎页
将/home/wwwroot/default/dbi/dbi/Lib/Action/IndexAction.class.php 复制到文件/home/wwwroot/default/dbi/dbi/Lib/Action/UserAction.class.php
将文件内容修改为:
<?php
// 本类由系统自动生成,仅供测试用途
class UserAction extends Action {
public function Add(){
$this->show('<style type="text/css">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: "微软雅黑"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bot
tom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style="padding: 24px 48px;"> <h1>:)</h1><p>欢迎使用 <b>Module User</b>!</p></div><script type="text/javascript" src="http://tajs.qq.com/stats?
sId=9347272" charset="UTF-8"></script>','utf-8');
}
}
测试使用URL:http://127.0.0.1/dbi/index.php/User/Add
出现404页面。
同样过程在WAMP环境下成功,但最终要求是Linux环境,请大牛帮助!
最佳答案
评论( 相关
后面还有条评论,点击查看>>