Welcome Guest, Not a member yet? Register   Sign In
View string needs escape if back slash on end
#12

IMO namespaces are *not* directories and should always be referenced with backslashes. What works versus what "should be" vary quite a bit, but in this case the slash directions don't really matter because `view()` uses FileLocator's `locateFile()` which has the following code:
PHP Code:
        // Standardize slashes to handle nested directories.
        
$file strtr($file'/''\\'); 

... which replaces all forward slashes with backslashes prior to executing the lookup. Bottom line is: backslash is more technically correct (opinion), either slash will work, backslash requires escaping.
Reply


Messages In This Thread
RE: View string needs escape if back slash on end - by MGatner - 07-05-2019, 10:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB