HELP with URL |
[eluser]Evollution[/eluser]
http://www.fifago.com/demo2/index.php/news so i created news ... what shoud i do so that when i acces : http://www.fifago.com/demo2/index.php/news/3 http://www.fifago.com/demo2/index.php/news/4 ... see the news content with id 4 .. txn
[eluser]Twisted1919[/eluser]
Simple: Code: class News extends Controller{ P.S: esti roman din cate vad, nu?
[eluser]Evollution[/eluser]
Fatal error: Call to a member function GET_ARTICLE_BY_ID() on a non-object in /home/fifagoc1/public_html/demo2/application/controllers/news.php on line 52 poate trebuie sa fac load la vreo librarie ?
[eluser]Evollution[/eluser]
+ e posibil de facut putin seo adica daca o sa pun /id/news-title .. nu vor fi probleme cu functia asta !?
[eluser]Evollution[/eluser]
MY code Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
[eluser]Evollution[/eluser]
din cate am inteles eu trebuie sa fac functia GET_ARTICLE_BY .. in model si am facut ceva de genu Code: function GET_ARTICLE_BY_ID($article_id) .. poate incurc eu ceva :\
[eluser]Twisted1919[/eluser]
Daca modelul tau se numeste News_model si metoda din model care ia stirile se numeste get_article_by_id($article_id) atunci: Code: $this->load->model('news_model');
[eluser]Evollution[/eluser]
da acum merge doar ca cand apas pe url autopat face redirect la /news http://www.fifago.com/demo2/index.php/news/3 |
Welcome Guest, Not a member yet? Register Sign In |