contra10 Posted January 4, 2009 Share Posted January 4, 2009 hi i want to know if i can find away around the fprward slahses they keep highlighting to green $urlroot = "http://localhost/images/"; Quote Link to comment https://forums.phpfreaks.com/topic/139397-solved-dealing-with-forward-slashes/ Share on other sites More sharing options...
ratcateme Posted January 4, 2009 Share Posted January 4, 2009 im not sure what you mean that is perfectly valid php there should be no problem with that line Scott. Quote Link to comment https://forums.phpfreaks.com/topic/139397-solved-dealing-with-forward-slashes/#findComment-729141 Share on other sites More sharing options...
premiso Posted January 4, 2009 Share Posted January 4, 2009 Ummm what do you mean "highlighting to green" ? What type of text editor are you using? And to answer the question, no, there is no way around it. Quote Link to comment https://forums.phpfreaks.com/topic/139397-solved-dealing-with-forward-slashes/#findComment-729145 Share on other sites More sharing options...
contra10 Posted January 4, 2009 Author Share Posted January 4, 2009 im using notepad ++ and $root= "C:\wamp\www\images\"; $urlroot = "http[color=green]://localhost/images/";[/color] it looks like that so the rest of my code won't work Quote Link to comment https://forums.phpfreaks.com/topic/139397-solved-dealing-with-forward-slashes/#findComment-729148 Share on other sites More sharing options...
corbin Posted January 4, 2009 Share Posted January 4, 2009 $root= "C:\wamp\www\images\"; Is invalid... \ is the escape character in PHP, so it's interpreting that as a non terminated string. Try $root= "C:\\wamp\\www\\images\\"; Or $root= "C:/wamp/www/images/"; Quote Link to comment https://forums.phpfreaks.com/topic/139397-solved-dealing-with-forward-slashes/#findComment-729150 Share on other sites More sharing options...
ratcateme Posted January 4, 2009 Share Posted January 4, 2009 well you top line is failing it should be $root= "C:\\wamp\\www\\images\\"; but because it was failing it thought that //localhost/images/ was a comment change the first line and it will work Scott. Quote Link to comment https://forums.phpfreaks.com/topic/139397-solved-dealing-with-forward-slashes/#findComment-729151 Share on other sites More sharing options...
contra10 Posted January 4, 2009 Author Share Posted January 4, 2009 ohhh i didn't know that thank you Quote Link to comment https://forums.phpfreaks.com/topic/139397-solved-dealing-with-forward-slashes/#findComment-729159 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.