MetalSmith Posted January 9, 2010 Share Posted January 9, 2010 Hi all! The $bridge variable is not getting passed while it is contained in the line below: Maybe I don't have the right brackets around it? I want the result to say Bridge1 I think it's because its a WshShell command. Any ideas? $bridge = 1; if ($refresh == 1) { $WshShell = new COM("WScript.Shell"); $WshShell->Run('"C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\aastra\putty.exe" -load "Bridge$bridge" -l root -pw password -m "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\aastra\list-56201.sh"'); sleep(2); } Quote Link to comment https://forums.phpfreaks.com/topic/187877-help-with-syntax/ Share on other sites More sharing options...
wildteen88 Posted January 9, 2010 Share Posted January 9, 2010 $WshShell->Run('"C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\aastra\putty.exe" -load "Bridge'.$bridge.'" -l root -pw password -m "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\aastra\list-56201.sh"'); Quote Link to comment https://forums.phpfreaks.com/topic/187877-help-with-syntax/#findComment-991939 Share on other sites More sharing options...
MetalSmith Posted January 9, 2010 Author Share Posted January 9, 2010 That worked!! Why does that work? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/187877-help-with-syntax/#findComment-991944 Share on other sites More sharing options...
wildteen88 Posted January 9, 2010 Share Posted January 9, 2010 Variables are not parsed within single quotes. Quote Link to comment https://forums.phpfreaks.com/topic/187877-help-with-syntax/#findComment-991946 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.