Php,nodejs

if 0 is returned, the execution is successful, but it is obvious that the execution of nodejs failed. How can exec execute nodejs, to determine whether the execution is successful or not?

Mar.01,2021

I guess you started a node.js process to execute a script in php with exec ? You can write a js script that executes the script you really want to execute, and catch uncaught exceptions in this script to determine whether the execution is successful or not. If it fails, process.exit (1) . I'm not sure how php's exec is executed. If this doesn't work, you can inform the parent process of its execution status by communicating with other processes

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3a601-2b756.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3a601-2b756.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?