是否可以运行assimp命令行工具与php


is it possible to run assimp commandline tool with the php

我使用以下命令转换3d模型与assimp assimp,它在Windows上工作得很好:

assimp2json seaknight.obj seaknight.json 

我需要知道如何从PHP运行这个命令?我知道有函数可以从PHP运行shell执行,但它不起作用,我没有得到任何错误。

使用的PHP代码如下。

system("D:'assimp2json-2.0-win32'Release'assimp2json.exe assimp2json seaknight.obj seaknight.json");

,另一个是

$old_path = getcwd();
chdir('D:'assimp2json-2.0-win32'Release');
$output = shell_exec('assimp2json.exe assimp2json seaknight.obj seaknight.json');
chdir($old_path);

我自己找到的

工作代码在

下面
$old_path = getcwd();
chdir('D:'assimp2json-2.0-win32'Release');
$output = shell_exec('assimp2json monster.blend monster.json');
chdir($old_path);

不需要包含。exe,删除后命令工作