Welcome Guest, Not a member yet? Register   Sign In
Image CRUD
#1

How to fix this error?




An Error Was Encountered




The configuration file image_crud.php does not exist. 

I run this url:  http://127.0.0.1/CompanyProfileCI/index....showimages



cpages/slideshowimages.php



PHP Code:
public function slideshowimages() 
    
        
 
    
        $image_crud 
= new image_CRUD();
    
        $image_crud
->set_primary_key_field('id');
        $image_crud->set_url_field('url');
        $image_crud->set_title_field('title');
        $image_crud->set_table('example_4')
        ->set_ordering_field('priority')
        ->set_image_path('assets/uploads');
            
        $output 
$image_crud->render();
    
        $this
->_example_output($output);
    
        $this
->load->view('slideshow_images'); 
    
        



views/slideshow_images.php

PHP Code:
<!DOCTYPE html>
<
html>
<
head>
    <
meta charset="utf-8" />
<?
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>
</head>
<body>
    <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>
</body>
</html> 


There is this file in :  libraries/image_crud.php
" If I looks more intelligence please increase my reputation."
Reply
#2

It seems you need an image_crud.php configuration file (should be in application/config directory)
Reply
#3

Fatal error: Cannot redeclare class image_CRUD in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\config\image_crud.php on line 22
A PHP Error was encountered
Severity: Compile Error
Message: Cannot redeclare class image_CRUD
Filename: config/image_crud.php
Line Number: 22
Backtrace:


Line 22:

config/image_crud.php


PHP Code:
class image_CRUD {

    protected $table_name null;
    protected $priority_field null;
    protected $url_field 'url';
    protected $title_field null;
    protected $relation_field null;
    protected $subject 'Record';
    protected $image_path '';
    protected $primary_key 'id';
    protected $ci null;
    protected $thumbnail_prefix 'thumb__';
    protected $views_as_string '';
    protected $css_files = array();
    protected $js_files = array(); 


How to fix the error?  and how to fix the config file?  Can I just copy paste or can I just recreate the new one?
" If I looks more intelligence please increase my reputation."
Reply




Theme © iAndrew 2016 - Forum software by © MyBB