Welcome Guest, Not a member yet? Register   Sign In
Galleries Add
#1

http://127.0.0.1/CompanyProfileCI/index....dgalleries



A PHP Error was encountered
Severity: Notice
Message: Undefined variable: css_files
Filename: views/galleries_add.php
Line Number: 51
Backtrace:
File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\views\galleries_add.php
Line: 51
Function: _error_handler
File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\controllers\cpages.php
Line: 107
Function: view
File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\index.php
Line: 315
Function: require_once


A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: views/galleries_add.php
Line Number: 51
Backtrace:
File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\views\galleries_add.php
Line: 51
Function: _error_handler
File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\controllers\cpages.php
Line: 107
Function: view
File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\index.php
Line: 315
Function: require_once


A PHP Error was encountered
Severity: Notice
Message: Undefined variable: js_files
Filename: views/galleries_add.php
Line Number: 55
Backtrace:
File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\views\galleries_add.php
Line: 55
Function: _error_handler
File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\controllers\cpages.php
Line: 107
Function: view
File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\index.php
Line: 315
Function: require_once


A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: views/galleries_add.php
Line Number: 55
Backtrace:
File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\views\galleries_add.php
Line: 55
Function: _error_handler
File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\controllers\cpages.php
Line: 107
Function: view
File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\index.php
Line: 315
Function: require_once


Example 1 - Simple | Example 2 - Ordering | Example 3 - With group id | Example 4 - Images with title | Simple Photo Gallery
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: output
Filename: views/galleries_add.php
Line Number: 89
Backtrace:
File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\views\galleries_add.php
Line: 89
Function: _error_handler
File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\controllers\cpages.php
Line: 107
Function: view
File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\index.php
Line: 315
Function: require_once


How to fix Undefined variable: css_files ?  (  Undefined variable: css_files  )

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> 


and Undefined variable: output ?  ( views/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>
            
            
        </div>
        </div> 


views/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>
            
            
        </div>
        </div> 
" If I looks more intelligence please increase my reputation."
Reply
#2

It's telling you the error right there in front of you it cannot find the variable css_files.

The first error can lead to multiple other errors until you fix the first one.

You need to start learning php if you want to code in it.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB