Welcome Guest, Not a member yet? Register   Sign In
Add Animation to the CodeIgniter view
#1

Hello everyone !

I have an animation file that actually draws 2 images (in the attached file), I've been working for 2 days now without having been able to call the html file (containing 2 images) from the view in CodeIgniter. This file, when run alone, shows 2 images (rectangle, eclip), but when inserted into CodeIgniter does not show

Looking forward to your help, how can I display images in CodeIgniter
Reply
#2

Show code, or nobody can help.
Reply
#3

Are you using .htaccess file to remove "index.php" from url?
Reply
#4

(04-13-2017, 01:55 PM)skunkbad Wrote: Show code, or nobody can help.



Hello everybody
This is my source:
- Controller welcome: call view a.html (why not show image, but show word "HELLO")
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Welcome extends CI_Controller {
 
    public function index()
    {
        $this->load->view('a.html');
    }
}


- My view (a.html) in the attached file. Change file "views.html" => "views.rar" (because I can't attache   *.rar)



Thanks All

Attached Files
.html   views.html (Size: 39.36 KB / Downloads: 104)
Reply
#5

because your url paths are not setup to run with a CodeIgniter view.

you need to set your image paths using the base_url using the url_helper.

autoload the url_helper in ./application/config/autoload.php under helpers

then you can set a views path like so:

PHP Code:
<?php echo base_url('path_to_image'); ?>
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#6

(04-14-2017, 02:48 AM)InsiteFX Wrote: because your url paths are not setup to run with a CodeIgniter view.

you need to set your image paths using the base_url using the url_helper.

autoload the url_helper in ./application/config/autoload.php under helpers

then you can set a views path like so:

PHP Code:
<?php echo base_url('path_to_image'); ?>

I can't show image.
Can you send me source,please?
Thanks
Reply
#7

Has anyone helped me with this problem?
Please, Thanks
Reply




Theme © iAndrew 2016 - Forum software by © MyBB