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

从php使用windows'hell

I'm building a website that needs some ressources from a software in windows. So, I need to run windows' shell from notepad++ using php. Are there any php scripts to execute commands from windows' shell?

You can use the PHP function exec() - do note that there are some bugs with it (If a script (with the exec command) is loaded more than once by the same user at the same time the server will freeze.)

A solution for this is found in the PHP manual:

<?php

session_write_close();
exec($cmd);
session_start();

?>

近期文章

  • 如何创建一个按钮,重定向到用户在HTML或PHP中查看的最后一页[关闭]
  • PHP和SQL插入语句[重复]
  • 上传JavaScript或PHP [关闭]
  • 使用n2blr时,html <br>标签出现在段落中
  • 我的PHP用户登录无效[关闭]
  • php captcha图像脚本无法正常工作
  • 如何使用数组作为变量?
  • 登录不起作用 - 注册工作正常
  • 如何注册1个月计划的用户? [关闭]
  • 从另一个函数中调用函数[关闭]
  • PHP If语句不重定向空字符串
  • php使用preg_match在href标签内获取2个字符串
  • php javascript在每个页面上打印特定的页脚
  • 如何运行存储在MySQL数据库中的PHP unlink命令[关闭]
  • 在PHP中格式化数组作为示例中给出的必需输出[关闭]
  • 如何在php中正确包含cronjobs和正常执行的文件
  • 数据库帮助/查询[关闭]
  • 到达时间[关闭]
  • PHP中的PHP变量? [重复]
  • 为什么不|| 工作? [关闭]

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

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

友情链接:代码精华