mythri Posted August 30, 2021 Share Posted August 30, 2021 I am developing a script in which i will be publishing topics to MQTT server and also when i receive the message , i submit few data to database too. I have copied and the files from MQTT client in E drive as in here , and i have pasted it in my local root directory www/phpmqtt. but i am not getting how run this subscribe.php under examples folder. I tried running it like this - http://phpmqtt/examples/subscribe.php. It shows data from phpMQTT.php messages, but doent shows what is there in subscribe.php. How to run this? Please somebody suggest me. And also where and how do i define topics? Please help me out Quote Link to comment https://forums.phpfreaks.com/topic/313625-mqtt-with-php-and-wamp-server/ Share on other sites More sharing options...
gw1500se Posted August 30, 2021 Share Posted August 30, 2021 You can't just copy and paste code you find on the internet. You need to understand what the code does and how to adapt it to your environment. As a help forum you need to post your code here (using the code icon (<>) in the top menu specifying PHP or HTML as appropriate) along with any error messages and/or what output you expect that is different from what you actually get. The first place to start is to make sure your httpd is running properly. What files are currently in your DocRoot? Quote Link to comment https://forums.phpfreaks.com/topic/313625-mqtt-with-php-and-wamp-server/#findComment-1589463 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.