• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change in view, only PHP files accepted?

#1
I just noticed that the view has changed:

From the Manuals:

>>> CI 3.15
     The .php file extension does not need to be specified unless you use something other than .php.

>> CI4
     The .php file extension does not need to be specified, but all views are expected to end with the .php extension.
CI4 - Playground:
    https://www.john-betong.tk/test/1/42
CI 3.15  -  AmpProject 
     http://tools.pingdom.com/fpt/#!/uC1KU/ww...-jokes.com

Reply

#2
Nothing has has changed (other than the wording in the user guide) - "view" files have always been .php, and the extension is not used when they are referenced.
Reply

#3
(07-13-2017, 01:32 AM)ciadmin Wrote: Nothing has has changed (other than the wording in the user guide) - "view" files have always been .php, and the extension is not used when they are referenced.

I checked with CI 3.15 and could load a .CSS file but CI4 added a php extension.
CI4 - Playground:
    https://www.john-betong.tk/test/1/42
CI 3.15  -  AmpProject 
     http://tools.pingdom.com/fpt/#!/uC1KU/ww...-jokes.com

Reply

#4
That doesn't sound right. Can you provide an example? CSS is referenced inside a view, but not "processed" by view rendering.
Reply

#5
(07-13-2017, 03:10 AM)ciadmin Wrote: That doesn't sound right. Can you provide an example? CSS is referenced inside a view, but not "processed" by view rendering.

Controller - CI 3.15
PHP Code:
$data['jb_style'] = $this->load->view'incs/style-jj-2016-07-27.css',[], TRUE); 

View file:
PHP Code:
 // $css = file_get_contents( STYLEPATH );

 
 $css $jb_style;
 
 $css str_replace(["\t""\n""\r""  "], NULL$css);
// print_r($css);die;
echo = <<< ____TMP
  <style type="text/css">
   
$css
  </style>
____TMP; 
CI4 - Playground:
    https://www.john-betong.tk/test/1/42
CI 3.15  -  AmpProject 
     http://tools.pingdom.com/fpt/#!/uC1KU/ww...-jokes.com

Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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