我尝试通过调用PHP文件,使用Powershell在本地主机URL中传递request_number
在HTML中:
<a href='workflow_execution_progress.php?view_id=".$row['request_number']."' title='Click to see the progress of workflow'>我引用了这个链接,但不确定要用参数修改它。Executing php script on powershell
更新:我的PowerShell
$PhpExe = "C:\path\to\php\install\dir\php.exe"
$PhpFile = "C:\path\to\script.php"
$PhpArgs = '-f "{0}"' -f $PhpFile //args like view_id = 1 / 2 /3 (dynamically)
$PhpOutput = & $PhpExe $PhpArgs发布于 2020-10-14 20:13:12
您可以使用$argv来获取传递给脚本的参数数组。
https://www.php.net/manual/en/reserved.variables.argv.php
php script.php arg1 arg2 arg3
<?php
var_dump($argv);
?>
array(4) {
[0]=>
string(10) "script.php"
[1]=>
string(4) "arg1"
[2]=>
string(4) "arg2"
[3]=>
string(4) "arg3"
}https://stackoverflow.com/questions/64352641
复制相似问题