在网页的页眉和页脚上获取session_start警告

时间:2017-07-28 20:38:08

标签: php forms session

我一直在网页上收到此警告,而且我不确定如何解决此问题,有人可以向我提供有关如何删除此警告的详细示例。

标题

  

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

     

警告:session_start()[function.session-start]:无法发送会话缓存限制器 - 已发送的标头(输出从/home/content/58/7146558/html/upload/include/fgcontactform.php:63开始)在第63行的/home/content/58/7146558/html/upload/include/fgcontactform.php中

页脚

  

警告:未知:打开(/ home / content / 58/7146558 / tmp / sess_n8fne7p2utq3e17monl6fo0lh5,O_RDWR)失败:第0行的“未知”中没有此类文件或目录(2)

     

警告:未知:无法写入会话数据(文件)。请验证session.save_path的当前设置是否正确()在第0行的未知中

以下是代码:

<?PHP
 /*
   Contact Form from HTML Form Guide

This program is free software published under the
terms of the GNU Lesser General Public License.

This program is distributed in the hope that it will
be useful - WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

@copyright html-form-guide.com 2010
*/
require_once("class.phpmailer.php");

/*
Interface to Captcha handler
*/
class FG_CaptchaHandler
{
function Validate() { return false;}
function GetError(){ return '';}
}
/*
FGContactForm is a general purpose contact form class
It supports Captcha, HTML Emails, sending emails
conditionally, File atachments and more.
*/
class FGContactForm
{
var $receipients;
var $errors;
var $error_message;
var $name;
var $email;
var $message;
var $from_address;
var $form_random_key;
var $conditional_field;
var $arr_conditional_receipients;
var $fileupload_fields;
var $captcha_handler;

var $mailer;

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();
}

function AddRecipient($email,$name="")
{
    $this->mailer->AddAddress($email,$name);
}

0 个答案:

没有答案