• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
View string needs escape if back slash on end

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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.