我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

在xampp上执行nodejs文件

I am trying to execute a javascript file through nodejs on xampp. I am using a php code to first execute the javascript file in terminal and output the result.

<?php
exec('node crawl.js', $x);
print_r($x);
?>

The command runs fine in terminal, but running through this php script on localhost return nothing.

I have executed many commands (like ls, cd etc.) and all work fine.

近期文章

  • Laravel在1个查询中多次计数
  • 更改add_filters数组中的函数
  • 使用readfile()从子目录PHP文件中伪造浏览器url -served
  • 将数据库中的信息显示在不同单元格的HTML表格中
  • 关于Wordpress集成的FullCalendar - 如何集成PHP文件
  • Mariadb错误:此MariaDB不允许使用该命令
  • 从ajax调用中检索值
  • 在xampp mysql和mysqli都工作,我如何改变我们的plesk服务器,以避免破坏网站[重复]
  • 无法使用PHP中的cURL下载文件
  • 如何比较php中段落的两个字符串
  • PHP imagecopy功能根据主图像的高度和宽度改变图章大小
  • 从Woocommerce产品搜索结果页面删除跟踪
  • Joomla中的自定义URL字段 - 删除mailto前缀
  • 雄辩的渴望加载自定义属性
  • 如何插入可翻译的字段?
  • 如何从数据库中获取数据并使用php中的下拉列表将其显示到标签?
  • 插入外键与其他字段
  • 如何用php Tag替换方形标签
  • Jquery自动完成包含帖子数据
  • 为什么在Laravel 5.6中没有通过验证更新表值?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华