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

(This post was last modified: 06-28-2019, 09:55 AM by InsiteFX. Edit Reason: updated )

Not sure if this is a bug or not but while working on my adminLTE 3 module
when I have an echo view like this:

PHP Code:
echo view('Insitefx\Admin\Views\'.$slug); 

All code lines after the view are red with error: (Expecting right single quote or double quote).
As you can see it is quoted correctly, if I escape the back slash like this:

PHP Code:
echo view('Insitefx\Admin\Views\\'.$slug); 

Then everything is alright and it will load the Admin module view with no errors.

It also works correctly using just single forward slashes.

But should it also work with single back slashes? This is a Windows 10 Pro x64-bit System.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

Messages In This Thread
View string needs escape if back slash on end - by InsiteFX - 06-28-2019, 09:48 AM

Theme © iAndrew 2016 - Forum software by © MyBB