php - PHP exec() 从 CMD 编译 VB6
问题描述
我对 PHP 很陌生,我需要从 Windows 命令提示符编译一个 vb6 项目。我已经尝试了一切,但似乎没有任何效果,甚至创建一个批处理并从 PHP 代码执行,没办法......(如果从 cmd 本身启动批处理工作)。我还用各种路径定义了变量,但没有成功。IE:
$cmd = ('vb6.exe -MAKE D:\Websites\devopservices\dlledit\portaleeditorisen\NewSecurity\Data\NewSecurity_data.vbp D:\Websites\devopservices\dlledit\compiled\test.dll');
echo exec($cmd);
或插入带有变量的路径:
$proj = 'D:\Websites\devopservices\dlledit\portaleeditorisen\NewSecurity\Data\NewSecurity_data.vbp';
$dll = 'D:\Websites\devopservices\dlledit\compiled\test.dll';
这是我需要执行的完整命令:
<?php
echo exec('"C:\Program Files (x86)\Microsoft Visual Studio\VB98\VB6.EXE" /MAKE D:\Websites\devopservices\dlledit\portaleeditorisen\NewSecurity\Data\NewSecurity_Data.vbp D:\Websites\devopservices\dlledit\compiled\NewSecurity_Data.dll');
?>
谢谢你的帮助。
解决方案
我解决了,这不是 php 问题,而是与 IIS 应用程序池中的身份有关 :-)
推荐阅读
- python - 有没有办法在循环中处理具有相似名称(数字差异)的字典中的文件?
- pandas - 使用 np.select 来自另一列的数据
- python-3.x - 如何从用户窗口隐藏 Hangout-chat-bot 未响应消息?
- django - 在我的 Django 应用程序中使用一些 Pandas 函数
- json - 如何在 App Center 推送通知中编写受众 JSON 对象?
- angular - 如何通过将滚动条拖动到顶部或底部位置来实现分页?
- excel - 将日期转换为英国格式
- mysql - 为什么我的 `sql_calc_found_rows` 比 MySQL 中的 `count(*)` 快?
- android - 图库不会在 Android 中使用 Intent 显示图片
- python - 基于两列重组DataFrame