0

Windows CLIに送信する必要があるコマンドで変数を呼び出そうとしていますが、うまくいきません。助けていただければ幸いです

$imagename = 123;

$test = ('C:\Windows\System32\cmd.exe /c "rundll32.exe C:\Windows\System32\shimgvw.dll,ImageView_PrintTo /pt "c:\pathtodirectory\$imagename" "photoprint""');
echo $test

$imagename現在の値は 123 ですが、いくつかの見積もりでそれを呼び出すことができません。助けてください。

ありがとう。

4

2 に答える 2

0

これはどうですか?

$imagename = 123;
$test = 'C:\Windows\System32\cmd.exe /c "rundll32.exe C:\Windows\System32\shimgvw.dll,ImageView_PrintTo /pt "c:\pathtodirectory\\' . $imagename . '" "photoprint"';
echo $test;
于 2012-03-02T03:17:37.853 に答える