• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Split large page in more view

HI sorry for english , i have a page with 4000 row , because i can find error simply , i want split the page in several view 

can i do this in controller as this :

     $this->load->view('page/page1', $data);
     $this->load->view('page/page2', $data);

where page1 or page2 are apart of code...

Use CodeIgniter's pagination library: https://www.codeigniter.com/user_guide/l...ation.html
Another option is: use Datatables (javascript): https://datatables.net/

I haven't a table , i have a page with several row of code...

In that case, what you suggested is possible indeed:
PHP Code:

How this would help you to find errors more easily, isn't clear to me. Does it matter if you get an error message that says: error on line 1500 of 'page1', instead of line 3000 of 'page' ?? In both cases, it's obvious where to look, isn't it? Provided that you are using a code editor with line numbers, of course.
If you need 4000 lines of code for a view file, I'm affraid you're doing something basically wrong. How did you end up with such a large php file?

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.