php - Call a function of another file using "exec" command from current file -


i have file, notification.php, class. structure this:

class notificaiton {     public function sendnotification($token,$count)     {        // here code sending push notification(apns)     }       } 

normally, if want call function php file have make object of class , call method below:

$notification = new notification();    $notification->sendnotification($token,$value); 

but want call in background process. used exec() command below :

exec("/usr/bin/php /path/to/notification.php >> /path/to/log_file.log 2>&1 &"); 

here wonder how can call function(sendnotificaiton()) of file(notification.php) , pass arguments parameter: $token , $count ?

please guide me on this. appreciated.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -