0
Screenshot of the ErrorKohana_HTTP_Exception [404]:所請求的URL線路/ ID未在此服務器
無法從控制器顯示我的方法ID上找到。
我試圖訪問我的方法ID,我得到一個錯誤。 我去哪裏錯了?
<?php defined('SYSPATH') or die('No Direct Script Access');
Class Controller_Line extends Controller
{
public function action_index()
{
echo "<h1> Demonstration : KOHANA </h1>";
echo "This is a Line 1.<br>";
echo "This is a Line 2.<br>";
echo "This is a Line 3.<br>";
echo "This is a Line 4.<br>";
}
public function id()
{
echo "this is method id";
}
}
?>
我們需要查看調用id()的上下文。錯誤信息也會有幫助。 – Gordon
@戈登我已經添加了一個圖像&標題是錯誤的方式 –
我的天真猜測將是方法需要命名爲action_id()路由器能夠稱之爲。 – Gordon