1

Actually i'm using node-crawler under Node.js. Then i currently need to use the methods of PHPJS (An External Javascript File). How can i add or include that JS file into NODE.JS environment?

2 Answers 2

2

You can download one of the CommonJS files (here: http://phpjs.org/packages/index), save it locally and just require it like a standard NodeJS module:

var php = require('name of file');

php.md5(...)

Sign up to request clarification or add additional context in comments.

Comments

0

Just like any other file, except perhaps it will be up a few levels?:

enter code hererequire('../../path/to/whatever.js');

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.