【问题标题】:Warning: session_start() [function.session-start]: open() failed: No such file or directory警告:session_start() [function.session-start]: open() failed: No such file or directory
【发布时间】:2017-07-26 18:20:47
【问题描述】:

我在我的网站顶部收到此警告。有人可以为我提供有关如何解决此问题的详细解决方案。

警告:session_start() [function.session-start]: open(/home/content/58/7146558/tmp/sess_g6kr1vkvtfv14ht3hu268issv2, O_RDWR) 失败:没有这样的文件或目录(2 在 /home/content/58/ 7146558/html/upload/include/fgcontactform.php 第 63 行

代码如下:

    function FGContactForm()
{
    $this->receipients = array();
    $this->errors = array();
    $this->form_random_key = 'HTgsjhartag';
    $this->conditional_field='';
    $this->arr_conditional_receipients=array();
    $this->fileupload_fields=array();

    $this->mailer = new PHPMailer();
    $this->mailer->CharSet = 'utf-8';
}

function EnableCaptcha($captcha_handler)
{
    $this->captcha_handler = $captcha_handler;
    session_start();
}

【问题讨论】:

    标签: php ajax forms


    【解决方案1】:

    你应该在 php.ini 文件中设置会话路径:

    session.save_path = "/path/to/your/folder"
    

    否则,您可以使用:

    ini_set(session.save_path, '/path/to/your/folder')
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-01-21
      • 2020-05-26
      • 2018-09-09
      • 2014-09-04
      • 1970-01-01
      • 2013-03-03
      • 1970-01-01
      相关资源
      最近更新 更多