php - Escaping a Windows server file path string with single and double backslashes in it? -


i have windows server file path i'm having lot of difficulty escaping because of php's magic quotes feature. assuming turning setting off isn't trivial, how go escaping path?

example:

\\server\folder1\folder2\folder3\file.dtsx 

to complicate things further, path need run part of command wrapped in set of quotes since runs via command prompt utility (called in sql). full command this:

$package =             'dtexec.exe /f "\\server\folder1\folder2\folder3\file.dtsx" ' +              '/set \package.variables[user::param1].properties[value];"' + cast(@param1 varchar) + '" ' +              '/set \package.variables[user::param2].properties[value];"' + cast(@param2 varchar) + '" ' +              '/set \package.variables[user::param3].properties[value];"' + cast(@param3 varchar) + '"'; 

i think main challenge server file path if can lend hand here, though! in advance!

dan


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -