refiking Posted December 16, 2009 Share Posted December 16, 2009 so far I haven't figure it out. I know it's simple, though.. define ('location', 'C:\Documents and Settings\Client Sites\hosting\'); echo location; Link to comment https://forums.phpfreaks.com/topic/185321-how-do-i-add-slashes-to-this/ Share on other sites More sharing options...
Deoctor Posted December 16, 2009 Share Posted December 16, 2009 try this <?php define ('location', 'C:\\Documents and Settings\\Client Sites\\hosting\\'); echo location; ?> Link to comment https://forums.phpfreaks.com/topic/185321-how-do-i-add-slashes-to-this/#findComment-978297 Share on other sites More sharing options...
nafetski Posted December 16, 2009 Share Posted December 16, 2009 When you are working with strings, if you want to use quotations you have to "escape" them first. Example: <?php $string = "My name is \"john\"; ?> Since we use backslashes to escape, you have to escape your backslashes as well (that's what the post above me is doing) Link to comment https://forums.phpfreaks.com/topic/185321-how-do-i-add-slashes-to-this/#findComment-978307 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.