![]() |
convert to CI - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: convert to CI (/showthread.php?tid=65184) Pages:
1
2
|
convert to CI - davy_yg - 05-11-2016 Hello, I have this html file that I would like to change to CI so that it function well. Can anyone help me comment what I should change so that the file works well in CI? So far The style does not work. Original: backend-template/index.php PHP Code: <!DOCTYPE html> After transfer to views/index.php I cannot copy the same file exactly as it does not work as good. Please help. Thanks. RE: convert to CI - davy_yg - 05-11-2016 views/index.php PHP Code: <head> A PHP Error was encountered Severity: Error Message: Call to undefined function base_url() Filename: views/index.php Line Number: 7 Backtrace: Line 7: <link rel="stylesheet/less" type="text/css" href="<?php echo base_url(); ?>themes/less/bootstrap.less"> Why this error still appears? RE: convert to CI - pdthinh - 05-11-2016 Load url helper in your controller: PHP Code: $this->load->helper('url'); RE: convert to CI - davy_yg - 05-12-2016 http://localhost/backend_CI/applications/views/index.php I build this code and already load the url helper but the view stilll does not seems to load the style sheet I wonder why? views/index.php PHP Code: <!DOCTYPE html> Code: <script src="http://127.0.0.1/backend_CI/themes/js/excanvas.min.js"></script> RE: convert to CI - davy_yg - 05-12-2016 I even already replace with: views/index.php PHP Code: <head> and I still cannot access the style css. I wonder why? RE: convert to CI - davy_yg - 05-12-2016 I already try typing: http://localhost/backend_CI/index.php/views/themes/style/add.css it cannot shows anything. 404 Page Not Found The page you requested was not found. I wonder why? RE: convert to CI - CI_MASTER - 05-12-2016 MOVE IT OUTSIDE THE APPLICATION MODEL(eg :assets) then access it <link rel="stylesheet" href="<?php echo base_url(); ?>assets/themes/style/add.css"/> RE: convert to CI - davy_yg - 05-13-2016 views/index.php PHP Code: <div id="sidebar"> Hello, I trying to find a way so that when people click the navigation link it directly carries me to the intended address: <li><a href="<?php echo base_url(); ?>index.php/views/pages.php"><i class="icon icon-tint"></i> <span>Pages</span></a></li> but this is not the case, http://127.0.0.1/backend_CI/index.php/views/pages.php 404 Page Not Found The page you requested was not found. I wonder why? RE: convert to CI - PaulD - 05-13-2016 PHP Code: <a href="<?php echo base_url(); ?>index.php/views/pages.php"> Read the documentation - Please. http://www.codeigniter.com/user_guide/helpers/url_helper.html#site_url RE: convert to CI - davy_yg - 05-13-2016 I try clicking the navigation but it does not work out well. views/index.php PHP Code: <div id="sidebar"> controllers/Welcome.php PHP Code: public function pages() |