localhost --> website looks chaos |
Hello,
My website only looks good if I type this url: http://127.0.0.1/CompanyGiondaCI/index.php/cpages/index I wonder why it looks so bad if I type this url: http://127.0.0.1/CompanyGiondaCI/ views/navigation.php PHP Code: <div id="sidebar"> views/index.php PHP Code: <!DOCTYPE html> I wonder why the view with this: http://localhost/CompanyGiondaCI/ (This one looks a little bit chaos - I wonder why? ) and this: http://127.0.0.1/CompanyGiondaCI/ (This is one looks better) looks difference. Can anyone help me fix this website so that it looks better? Thanks in advance.
" If I looks more intelligence please increase my reputation."
Try to use the browser console, i think he can not find the correct paths.
Try adding: <base href="<?PHP echo base_url(); ?>" /> After the: <head> tag (And offcouse make sure you filled in $config['base_url'] in the application/config/config.php ) You also might change the paths to the files.
Hello,
This is my last code revision config/config.php PHP Code: $config['base_url'] = 'http://localhost/CompanyGiondaCI/'; views/index.php PHP Code: <head> A PHP Error was encountered Severity: Notice Message: Undefined property: Mpages::$load Filename: libraries/Form_validation.php Line Number: 147 Backtrace: File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\application\models\mpages.php Line: 10 Function: __construct File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\application\controllers\cpages.php Line: 32 Function: model File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\index.php Line: 315 Function: require_once Fatal error: Call to a member function helper() on null in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\system\libraries\Form_validation.php on line 147 A PHP Error was encountered Severity: Error Message: Call to a member function helper() on null Filename: libraries/Form_validation.php Line Number: 147 Backtrace: Any idea how to fix it?
" If I looks more intelligence please increase my reputation."
Model filename should be Ucfirst, Mpages.php not mpages.php and, the class name should be Ucfirst too.
Mpages.php PHP Code: class Mpages extends CI_Model {
Keep calm.
He's linkiing in the html to site_url() which displays index.php he needs to change all site_url's to base_url().
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Where can I find site_url() in my file? I can only find base_url() in the config.php
" If I looks more intelligence please increase my reputation."
It's in your view html file but in CI site_url is in the url_helper
Also any javascript should be the lastr lines in your html <head></head> section If you do not need the document ready place your javascript files at the end of your html file so that your pages load faster. <!-- javascript here --> </body> </html> What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |