我制作了这个小脚本,但无法收到此错误:
Strict Standards: Only variables should be passed by reference in C:\xampp\htdocs\includes\class.IncludeFile.php on line 34" off!
这是页面:
namespace CustoMS;
if (!defined('BASE'))
{
exit;
}
class IncludeFile
{
private $file;
private $rule;
function __Construct($file)
{
$this->file = $file;
$ext = $this->Extention();
switch ($ext)
{
case 'js':
$this->rule = '<script type="text/javascript" src="'.$this->file.'"></script>';
break;
case 'css':
$this->rule = '<link type="text/css" rel="stylesheet" href="'.$this->file.'">';
break;
}
}
private function Extention()
{
return end(explode('.', $this->file));
}
function __Tostring()
{
return $this->rule;
}
}
请帮我。