调用convertThis
课程时,出现以下错误:
致命错误:无法重新声明类convertThis 第4行的C:\ xampp \ htdocs \ xproject_private_functions \ convert.php
有人可以帮我吗?
convert.php
<?php
class convertThis
{
public $err_params;
public $errurl;
public $errtype;
public $errkeyline;
public static function errEncoder($err_url, $err_type, $err_keyline)
{
$this->errurl= base64_encode($err_url);
$this->errtype= base64_encode($err_type);
$this->errkeyline= base64_encode($err_keyline);
$this->err_params='{:'.hex2bin($err_url.'-'.$err_type.'-'.$err_keyline).':}';
print $this->err_params;
}
}
?>
的index.php
<?
if(file_exists('../_private/_functions/convert.php'))
{
require('../_private/_functions/convert.php');
}
else
{
die("Error...file not found!");
}
$obj= new convertThis();
$obj->errEncoder("http://localhost/af_cbms/index.php?id='36","500","id='36");
?>