Answer the question
In order to leave comments, you need to log in
How to fix input error on nodejs?
connected a php script to a bot on nodejs and after the request it should give a link, but it only outputs for the previous message
var runner = require("child_process");
var phpScriptPath = "file.php";
var argsString = "value,value2,value";
runner.exec("php " + phpScriptPath + " " +argsString, function(err, phpResponse, stderr) {
if(err) console.log(err); /* log error */
const chatId = msg.chat.id;
bot.sendMessage(chatId, phpResponse );
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question