Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why i am getting saved as false when i run script using PHP #79

Open
shakticmexpertise opened this issue Apr 13, 2018 · 0 comments
Open

Comments

@shakticmexpertise
Copy link

I am writing very simple script of scraper and i want to run this script using PHP. i have written below code for php.

$response = exec('node /home/user12/index.js > /home/user12/my_app_log.log 2>&1');
print_r($response);

this is returning response like this:

[ Resource {
    url: 'https://stackoverflow.com/questions/39505659/executing-nodejs-script-file-in-php-using-exec',
    filename: 'index.html',
    type: null,
    depth: 0,
    parent: null,
    children: [],
    saved: false } ]

you can see i am getting saved:false but the same index.js file i run from terminal i got saved:true with html contents. what i am missing here could you please help me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant