please help ! - Create Library Load Data Fail - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: please help ! - Create Library Load Data Fail (/showthread.php?tid=42760) |
please help ! - Create Library Load Data Fail - El Forum - 06-18-2011 [eluser]Andychan[/eluser] application/libraries/LoadData.php Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); application/controllers/about.php Code: <?php application/views/about_view.php Code: <div class="right"> Show Error Message Quote:A PHP Error was encountered please help ! - Create Library Load Data Fail - El Forum - 06-18-2011 [eluser]osci[/eluser] As the message says, a is undefined. Read about php scope variables in php manual. Search forum. A 1 minute search and I found this thread. please help ! - Create Library Load Data Fail - El Forum - 06-18-2011 [eluser]Andychan[/eluser] I try it, but..... Quote:Fatal error: Call to undefined method About::loaddata() please help ! - Create Library Load Data Fail - El Forum - 06-18-2011 [eluser]osci[/eluser] You need to read a little about variable scopes Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); please help ! - Create Library Load Data Fail - El Forum - 06-18-2011 [eluser]Andychan[/eluser] oh ! thanks for your great help ! It works ! please help ! - Create Library Load Data Fail - El Forum - 06-18-2011 [eluser]Andychan[/eluser] May I ask one more question. How can I save array data and get it? I checked it on http://php.net/manual/en/language.variables.scope.php It is not a clearly understand. please help ! - Create Library Load Data Fail - El Forum - 06-18-2011 [eluser]osci[/eluser] I don't understand what you mean by save array data. please help ! - Create Library Load Data Fail - El Forum - 06-18-2011 [eluser]Andychan[/eluser] I settled it,thanks ! Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); please help ! - Create Library Load Data Fail - El Forum - 06-18-2011 [eluser]Frank Wong[/eluser] @Andychan, just to clarify for the future, you were asking how to set or populate an array. Not save array data. |