この小さなスクリプトを作成しましたが、このエラーが発生しません:
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;
}
}
私を助けてください。