Welcome Guest, Not a member yet? Register   Sign In
Threading integration in codeigniter ver 3.1 and php ver >=5.6 not working

Hello Everyone could anyone help me for the below.

I am trying create on library class which has do some curl call using my model method.
see below code snippet-
PHP Code:
class CI_Multi_thread extends Thread {
   protected $CI;
   public function __construct($data=array()) {
       $this->CI =&get_instance();
   public function run($data=array()) {

but &get_instance(); is not working. show "Fatal error: Cannot assign by reference to overloaded object in C:\xampp\htdocs\darshan\system\libraries\Multi_thread.php on line 8
also my server is also close my current process when last running thread is stop.

after all it stop my complete server working for 5 second.

I am also attaching my libraries and model file here.

Attached Files
.php   Multi_thread.php (Size: 813 bytes / Downloads: 71)
.php   Fauxapi_model.php (Size: 26.79 KB / Downloads: 63)
Darshan Baraiya
Founder & CEO WebMonks Technology
Contact Number - 80000 71314

" Self confidence is a small Lamp in a dark tunnel.

It does not show everything at once,

but gives enough light for the next step."

Theme © iAndrew 2016 - Forum software by © MyBB