laravel尝试访问/ what的url时访问禁止错误:任何语法

I have installed Laravel with Xampp server on Windows 7 successfully .

I tried to add routes url and it works fine.

I want to display a MySQL table values on localhost So I make a model

class data extends Model
{
protected   $table = 'Data'; 
}

and a controller class and inside this controller class this method to display MySQL table

   public function show($id)
   {
   $data = Data::where('service_id', $service_id)->select ('price' ); 
   return view('greeting')->with('data',$data); 
   }

And I add a route to display my web page showing my table data .

but I get this error

Access forbidden! You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster. Error 403

Although I haven't this error yesterday. but today I totally failed!!

I has observed that I get this error when I try to access any url likes this syntax /anything:anything e.g: /one/public/Motors:1 /one/public/planes:1

but no problem when I use no parameterized query.

查看全部
dongzj2015
dongzj2015
2015/06/28 12:03
  • laravel
  • apache
  • php
  • xampp
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

2个回复