最近の静的バインディングを使用しようとすると、このエラーが発生します。私はこのエラーについてGoogleで見つけることができるのは、人々はPHP5.3を持っていなかったが、私はバージョン5.3.6を持っているということです。構文エラー、予期しないT_STATIC
誰かが私を助けてくれますか?
おかげ
class Media
{
private $nom,
$ext;
public function ext_autorisees() { return array(); }
public function __construct($fichier, $thumb = false)
{
$fichier = explode(".", $fichier);
$nom = $fichier[0];
$ext = $fichier[1];
if(in_array(strtoupper($ext), static::ext_autorisees()))
{
if(strpos($nom, "thumb_") === 0 && !$thumb)
throw new Exception("");
}
else
throw new Exception("");
$this->nom = $nom;
$this->ext = $ext;
}
public function getNom() { return $this->nom; }
public function getExt() { return $this->ext; }
public function getPath() { return $this->getNom() . "." . $this->getExt(); }
public function getThumb() { return "thumb_" . $this->getPath(); }
}
これは私のためにうまく動作します。エラーはどの行ですか?あなたは5.3を実行していることをどのように知っていますか? –
私はそれを自分でインストールしたので... – Julie
私のディレクトリの名前はPHP5.3.6ですが、phpinfo()を呼び出すとPHP 5.2と表示されます。 – Julie