1

Hello Iam creating a chat with Ratchet. But in the pusher onOpen function i want it to access the database but when i put this line of code in my pusher class,

$connn = new mysqli($servername, $username, $password, $dbname);

i get the error below

Fatal error: Class 'MyApp\mysqli' not found in C:\xampp\htdocs\fotoserver\src\MyApp\Chat.php on line 25

my pusher class is in namespace MyApp What is wrong? why cant i access the dababase ? Any help will be hightly appreciated

henrybbosa
  • 1,139
  • 13
  • 28

0 Answers0