Global variable in a class not working (using Ajax) |
[eluser]Lone[/eluser]
The variable is only persistant in the controller for each http request. 1. Access http://domain.com/justtesting/foo1 - Sets var - Uses var 2. Access http://domain.com/justtesting/foo2 - Uses var Hope this makes some sense (you may look more into how objects are used in PHP/CI) - to cure the issue you could set the var in a model or library and access from there. |
Messages In This Thread |
Global variable in a class not working (using Ajax) - by El Forum - 05-28-2008, 06:58 AM
Global variable in a class not working (using Ajax) - by El Forum - 05-28-2008, 07:22 AM
Global variable in a class not working (using Ajax) - by El Forum - 05-28-2008, 08:17 AM
Global variable in a class not working (using Ajax) - by El Forum - 10-18-2008, 05:44 AM
Global variable in a class not working (using Ajax) - by El Forum - 10-18-2008, 05:58 AM
|