how to execute javascript on server-side?
is there a php library or so开发者_运维百科mething?
There's quite a few ways of executing JavaScript on the server-side. A recently popular environment is node.js. There's also options such as Rhino (which has Nitro and Helma). Wikipedia also has a massive list of server-side JavaScript environments.
You also asked if there was a PHP extension available. There's one called php-js, based upon Mozilla's SpiderMonkey.
You can execute JavaScript on the server side using Java 6 and Rhino.
精彩评论