Welcome Guest, Not a member yet? Register   Sign In
How to use view to load a CSS file
#1

I am delighted that the CI4 Alpha Version has been released and decided to rewrite some very, very old scripts that started even before CI2 was released.

The old script has been modified extensively and currently uses CI_VERSION: 3.1.8

This script was acceptable but now fails and curious to know the correct way to load the variable:



PHP Code:
$data['styleTest'] = view('incs/styleTest.css'$datatrue); 

Error Message:
Argument 3 passed to view() must be of the type array, boolean given, called in /home/john/www/test-ci4-version

I have tried numerous options and this KLUDGE works but I would far prefer to use the correct method of loading the file:

KLUDGE:
PHP Code:
 $tmp file_get_contents'/incs/styleTest.css' );
    $data['styleTest'] = $tmp
Reply


Messages In This Thread
How to use view to load a CSS file - by John_Betong - 05-19-2018, 09:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB