dsiuy42084 2013-08-31 15:22
浏览 43

代码点火器路由导致内部服务器错误

Been stuck on this for hours, hope it is not something to simple.

So I'm trying to route 3 vars from one URL to another with this code:

$route['activate_email/(:any)/(:any)/(:any)'] = "user/activate/$1/$2/$3";

and the user controller code:

public function activate($code='', $email='', $id=''){
    die("1");
    //Check vars
    if(empty($code) || empty($email) || empty($id) || !is_numeric(ceil($id))){
        die("BAD");         
    }

    //Check details in DB
    $result = $this->db->query("SELECT * FROM `companies` WHERE `id` = ?", array($id))->result_array();

    print_r($result);
    exit;


}

Result:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, cgiadmin@yourhostingaccount.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request. Thanks for any help

  • 写回答

1条回答 默认 最新

  • dongzaliang4492 2013-08-31 15:46
    关注

    It might be .htaccess issue. Try putting this code in your .htaccess and give it a try?

    RewriteRule ^(.*)$ index.php/$1 [L]

    And also try setting this option in your config file config['log_threshold'] to 4 and check exactly where the issue is coming from?

    评论

报告相同问题?

悬赏问题

  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了