How to deal with multiple include in different php file? -


i want send message on whatsapp php file. i've discovered library let , works in way:

<?php include_once './src/whatsprot.class.php';  function send($target,$message){ $username = "phone"; $password = "password"; $w = new whatsprot($username,"nickname", true); //name application replacing “whatsapp messaging” $w->connect(); $w->loginwithpassword($password);  $w->sendpresencesubscription($target); //let first send presence user $w->sendmessage($target,$message ); // send message }  send("phone","text of message"); 

?>

if try execute or launch via php web server works. if try call method send($target,$message); php file, this, doesn't work:

 <?php   include "whatsapp.php";  send($target, $message);  ?> 

what's problem? how can fix it?

if try call method send($target,$message); php file, doesn't work what's problem?

most php file located in different directory , command doesn't work:

include_once './src/whatsprot.class.php'; 

try use absolute path file.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -