please help ! - Create Library Load Data Fail |
[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
[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.
[eluser]Andychan[/eluser]
I try it, but..... Quote:Fatal error: Call to undefined method About::loaddata()
[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');
[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.
[eluser]Andychan[/eluser]
I settled it,thanks ! Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
[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. |
Welcome Guest, Not a member yet? Register Sign In |