且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PowerShell Invoke-Expression 在命令字符串中带有与号

更新时间:2023-11-06 15:53:04

&符号必须在用双引号括起来"&",所以你需要转义内部双引号

The ampersand must be double-quoted inside the string "&", so you need to escape the inner double quotes

$streamout_calmedia01 = "rtmp://...vent`"&`"adbe-record-mode=record"

或将字符串放在单引号中

or put the string in single quotes

$streamout_calmedia01 = 'rtmp://...vent"&"adbe-record-mode=record'