提问人:Muhaemin Nurhidayat 提问时间:1/18/2023 最后编辑:Muhaemin Nurhidayat 更新时间:1/18/2023 访问量:127
ini_set():会话处于活动状态。此时无法更改会话模块的 ini 设置
ini_set(): A session is active. You cannot change the session module's ini settings at this time
问:
请帮帮我,我无法访问我的网站,它总是显示错误:
遇到 PHP 错误 严重性:警告
消息:ini_set():会话处于活动状态。此时无法更改会话模块的 ini 设置
文件名:会话/会话.php
行号:282
回溯:
文件:/storage/ssd2/495/19547495/public_html/application/controllers/Auth.php 行:8 功能:__construct
文件:/storage/ssd2/495/19547495/public_html/index.php 行:316 功能:require_once 但是,如果我在localhost中运行代码就可以正常工作了......
这是来自会话 .php 的代码
`isset($params['cookie_name']) OR $params['cookie_name'] = config_item('sess_cookie_name');
if (empty($params['cookie_name']))
{
$params['cookie_name'] = ini_get('session.name');
}
else
{
ini_set('session.name', $params['cookie_name']);
}
isset($params['cookie_path']) OR $params['cookie_path'] = config_item('cookie_path');
isset($params['cookie_domain']) OR $params['cookie_domain'] = config_item('cookie_domain');
isset($params['cookie_secure']) OR $params['cookie_secure'] = (bool) config_item('cookie_secure');
session_set_cookie_params(
$params['cookie_lifetime'],
$params['cookie_path'],
$params['cookie_domain'],
$params['cookie_secure'],
TRUE // HttpOnly; Yes, this is intentional and not configurable for security reasons
);`
这是来自 auth.php 的代码
`<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Auth extends CI_Controller
{
public function __construct()
{
parent::__construct();
$this->load->library('form_validation');
$this->load->model('Auth_model');`
}`
这是来自 index.php 的代码
define('VIEWPATH', $view_folder.DIRECTORY_SEPARATOR);
/*
* -------------------------------------------------------------------
LOAD THE BOOTSTRAP FILE
* -------------------------------------------------------------------
*
```
type here
```
And away we go...
*/
require_once BASEPATH.'core/CodeIgniter.php';
`
我试图将其托管在 000webhost 上,但出现如下错误: https://amin69.000webhostapp.com
答: 暂无答案
评论