昨天照着视频跟着学框架,第一次用没有出现问题,今天想熟悉一下,结果再次按原方式书写代码就出现问题了,只是今天我写config.php时候代码出现错误,就修改了一下,然后把~app.php这个缓存文件给删了,网上有教程说1.4版本以下的TP在修改配置文件的时候必须先删掉缓存文件,结果我就给删了,我的TP是1.5版本的,虽然不需要删,但仍然试了下,结果可能就是这里出现了问题,~app.php文件生成不了debug_mode开了以后提示以下错误:系统发生错误 
您可以选择 [ 重试 ] [ 返回 ] 或者 [ 回到首页 ]
错误位置: FILE: D:\wamp\www\kuangjia\myapp\Temp\~runtime.php LINE: 7[ 错误信息 ]无法加载模块index[ TRACE ][09-07-11 12:13:07] D:\wamp\www\kuangjia\myapp\Temp\~runtime.php (7) App->exec()
[09-07-11 12:13:07] D:\wamp\www\kuangjia\index.php (8) App->run()在网上百度谷歌了一遍也没得到什么结果我把原来代码删了重新写了几遍仍然是这样的错误,郁闷死了,希望论坛高人能指点哥们一下呀,万分感谢!!!

解决方案 »

  1.   

    <?php  return array( 'APP_DEBUG' =>  true ,  // 开启调试模式 'DB_TYPE'=> 'mysql',     // 数据库类型 'DB_HOST'=> 'localhost', // 数据库服务器地址 'DB_NAME'=>'Think',   // 数据库名称 'DB_USER'=>'root',   // 数据库用户名 'DB_PWD'=>'',   // 数据库密码 'DB_PORT'=>'3306',  // 数据库端口 'DB_PREFIX'=>'',  // 数据表前缀 );?> 没错啊
      

  2.   

    他是windows系统,应该不会有权限问题啊
      

  3.   

    他们说是http://localhost/PHPThink/index.php/"User"/add要大写  可是我已经大写了 怎么还错啊
      

  4.   

    你自己有定义User这个控制器了没?有add方法没? 你定义的代码?
    http://localhost/PHPThink/index.php 其实访问的是
    http://localhost/PHPThink/index.php/index/index
      

  5.   

    <?php
    class UserAction extends Action{


    function index(){
    $this->display();  // 输出模板 
    }

    function add(){
    $User  = new Model('User');  // 实例化模型类 
    $list = $User->select();  // 查询数据 
    $this->assign('list',$list);  // 模板变量赋值 
    $this->display();  // 输出模板 
    }
    }
    ?>
      

  6.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>添加页面</title>
    </head>
    <body>
    <form action="__URL__/save" method="post">
    用户名: <input type="text" name="userName"/>
    密码:<input type="text" name="passWord"/>
    <input type="submit" value="添加">
    </form><!-- 循环输出查询结果数据集 --> <volist name='list' id='vo' > ID :{$vo.id}<br/> 用户名: {$vo.userName}<br/> 密码: {$vo.passWord}<hr> </volist> 
    </body>
    </html>
      

  7.   

    文件名称对了没?是否有User这个表了 不要new Model 直接显示模板能显示吗?
      

  8.   

    我的那个UserAction.class.php错了
      

  9.   

    大小写不要弄错,ThinkPHP对大小写很敏感的。