(02-12-2020, 12:15 PM)daveĀ friend Wrote: (02-12-2020, 11:06 AM)omid_student Wrote: Hi
I have a script file that when i run it command line and start in loop for accept socket
There is big problem
On start script file,i load config file and i use it in this file
But when i change config file,i have to can access to new data
Example $config['title'] = 'hello';
And run php script.php and waiting...
I change title to world
But because file is running,i cannot access to new data
I try to reload with $this->load->config('my_config')
But it is unless
Please help me
Instead of changing the config file you can change the value of $this->config['title'] while the script is running e.g.
PHP Code:
$this->config['title'] = 'World';
Otherwise, you have to exit the script, change the config file and run the script again before the new value can be used.
This is good when i reload page
But when config file loaded,anything changes not affect on your command