這是一個非常簡單的類,有一個靜態方法。我不能爲我的生活工作,爲什麼它拋出的錯誤:期待T_STRING?
Parse error: parse error, expecting `T_STRING' in C:...\error.php on line 7
這是代碼:
<?php
# Error class to handle errors
class Error
{
# Function to throw an error - which redirects with error msg
public static function Throw($id, $dest) // line 7
{
System::Redirect($dest."&e=$id");
exit;
}
}
?>
從「拋出」改爲別的東西會修復 –