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

从PHP运行python脚本给我null输出

i want to open and execute a python file using php . for this reason i’m using xamp . my php and python both files resides in htdocs folder. here is the code.

$output = shell_exec("python untitled6.py");
var_dump($output);

i have also tried different methods like

$python = 'C:\\Users\\Imama\\Anaconda2\\python.exe' ;
$pyscript= 'E:\\xamp\\htdocs\\untitled6.py' ;
$cmd = "$python $pyscript";
echo $cmd;
$result= exec($cmd);

i want help regarding plx :(

近期文章

  • apache不接受这个htaccess重写规则[重复]
  • Laravel中的多会话表
  • PHP CURL不获取代理(没有身份验证)
  • Taleo SOAP请求不返回PHP中的任何数据
  • 为什么选择字段不显示?
  • 通过sendgrid通过azure web app发送电子邮件
  • 大表格的Codeigniter表单验证(28个字段)
  • Laravel Query构建器中的多对多关系
  • PHP MySQLi - 基于产品类别显示产品
  • WooCommerce购物车 - 动态设置产品价格然后将优惠券应用于新的总计
  • Laravel - 无法从.env文件获取.pem公钥数据
  • PhpOffice / PhpWord库内容跳转到第二页问题
  • 如何找到方法属性/属性的类类型? [重复]
  • 将数据从“是”/“否”复选框插入到WordPress的数据库表中
  • 附加pdf大于2mb
  • 在php中上传图像和数据
  • PHP警告:遇到非数字值 - 标题
  • 如何使用自定义面板Drupal 8扩展管理员配置菜单
  • mysqli将数据插入phpmyadmin的问题
  • AppServiceProvider启动功能和动态标题

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

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

友情链接:代码精华