Add Animation to the CodeIgniter view |
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
Show code, or nobody can help.
(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
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 )
(04-14-2017, 02:48 AM)InsiteFX Wrote: because your url paths are not setup to run with a CodeIgniter view. I can't show image. Can you send me source,please? Thanks |
Welcome Guest, Not a member yet? Register Sign In |