Jump to content


harshalone

Member Since 24 Dec 2015
Offline Last Active Jul 20 2019 11:07 PM
-----

#149252 Ooooops, something went wrong! If you can see this message, this is proba...

Posted harshalone on 13 July 2019 - 02:29 PM

Solution:

 

Step 1:

 

Make sure in your view you have file iterated via a loop like this

 
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <?php foreach($output->css_files as $file): ?>
        <link type="text/css" rel="stylesheet" href="<?php echo $file; ?>" />
    <?php endforeach; ?>
</head>
<body>
        <div style="padding: 20px 10px;">
            <?php print_r($output->output); ?>
        </div>
        <?php foreach($output->js_files as $file): ?>
            <script src="<?php echo $file; ?>"></script>
        <?php endforeach; ?>
</body>
</html>

 

 

 

 

Step 2: please include this before output

 

if (isset($data->output ->isJSONResponse) && $data->output->isJSONResponse) {
            header('Content-Type: application/json; charset=utf-8');
            echo $data->output->output;
            exit;
        }$this->load->view('test',$data);