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); } 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"'); 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! 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. Link to comment https://forums.phpfreaks.com/topic/187877-help-with-syntax/#findComment-991946 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.