• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
about $view->setData($data);

#1
i have an very strange problem.

$view->setData($data) and $pager->makelinks() could not be exist in same controller. I don't know why.
once put them into same controller, the variable of setData will become "Undefined variable: $XXXXX".
Q&A for Codeigniter
StartBBS--open-source, light weight forum software.
Best VPS:Digital Ocean
Reply

#2
If you are trying to access data that you didn't explicitly make available to a view, then it won't be there. By default, it will not save data used in one view to use in another view, even if that view is called from within it. You can always use the save_data option to change that.

Is that what you're seeing? Or are you trying to access setData variables within the pagination templates? Or is it something else?
Practical CodeIgniter 3  • CodeIgniter 4 Foundations - Coming Soon • Vulcan - CLI Tools for CI4
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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