CodeIgniter Forums

Full Version: galleries_add
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
A PHP Error was encountered

Severity: Notice
Message: Undefined variable: css_files
Filename: views/galleries_add.php

Line Number: 77

Backtrace:

File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\views\galleries_add.php
Line: 77
Function: _error_handler

File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\controllers\cpages.php
Line: 51
Function: view

File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\index.php
Line: 315
Function: require_once


Undefined variable: css_files

galleries_add.php

PHP Code:
<div class="row-fluid">
                <
div class="span12">
                    
                    
                    
Galleries Name  <input type="text"></input>
        
                    <
button type="button" class="add" href="adminform.php">ADD GALLERIES</button
                    
                    
                    <
div class="widget-box">
                        <
div class="widget-title"><h5>Galleries</h5></div>
                        <
div class="widget-content">
                        
                        <?
php foreach($css_files as $file): ?>
                        <link type="text/css" rel="stylesheet" href="<?php echo $file?>" />
                        <?php endforeach; ?>

                        <?php foreach($js_files as $file): ?>
                        <script src="<?php echo $file?>"></script> 
                        <?php endforeach; ?>

                        <style type='text/css'>
                        body
                        {
                        font-family: Arial;
                        font-size: 14px;
                        }

                        a {
                        color: blue;
                        text-decoration: none;
                        font-size: 14px;
                        }

                        a:hover
                        {
                        text-decoration: underline;
                        }
                        </style>                    
                            
                        </div>
                        
                        <div>
                            <a href='<?php echo site_url('images_examples/example1')?>'>Example 1 - Simple</a> |
                            <a href='<?php echo site_url('images_examples/example2')?>'>Example 2 - Ordering</a> |
                            <a href='<?php echo site_url('images_examples/example3/22')?>'>Example 3 - With group id</a> |
                            <a href='<?php echo site_url('images_examples/example4')?>'>Example 4 - Images with title</a> | 
                            <a href='<?php echo site_url('images_examples/simple_photo_gallery')?>'>Simple Photo Gallery</a>
                        </div>
                        <div style='height:20px;'></div>  
                        <div>
                            <?php echo $output?>
                        </div>
                    </div>                    
                </div>
            </div> 



controllers/images_examples.php


PHP Code:
        function index()
    {
        
$this->_example_output((object)array('output' => '' 'js_files' => array() , 'css_files' => array()));
    } 


Line 77:                          <?php foreach($css_files as $file): ?>

How to fix the error?

Thanks in advance.