![]() |
HELP with URL - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html) +--- Thread: HELP with URL (/thread-37385.html) |
HELP with URL - El Forum - 01-07-2011 [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 HELP with URL - El Forum - 01-07-2011 [eluser]Twisted1919[/eluser] Simple: Code: class News extends Controller{ P.S: esti roman din cate vad, nu? ![]() HELP with URL - El Forum - 01-07-2011 [eluser]Evollution[/eluser] da ![]() HELP with URL - El Forum - 01-07-2011 [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 ? HELP with URL - El Forum - 01-07-2011 [eluser]Evollution[/eluser] + e posibil de facut putin seo adica daca o sa pun /id/news-title .. nu vor fi probleme cu functia asta !? HELP with URL - El Forum - 01-07-2011 [eluser]Evollution[/eluser] MY code Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); HELP with URL - El Forum - 01-07-2011 [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 :\ HELP with URL - El Forum - 01-07-2011 [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'); HELP with URL - El Forum - 01-07-2011 [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 |