Getting a blank page |
Hi All.
I am a noob at CI, have now worked my way fixing all errors etc, got my "hello world" to work, so th CI is there and working. and off course the index.php file is loading honkey-dori My problem seems to be DB connection, or I am not sure..... been testing with the examples from formget.com insert-data-into-database-using-codeigniter update-data-in-database-using-codeigniter delete-data-from-database-using-codeigniter At first i got some errors, that i fixed, but now when i go to display page (for the above mentioned) localhost/myDir/index.php/.......... i only get a blank white page, the title is loaded as i can see the text at the top..... but nothing else checked and added database to autoload... i am using CodeIgniter-2.2.0 PHP 5.63 MySQL 5 (SQLi) Any suggestions on how to get it to work........
If you think you have a Database connection problem you can use this script to test the connection.
PHP Code: <?php Place in a file and run it. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(10-25-2017, 03:16 AM)InsiteFX Wrote: If you think you have a Database connection problem you can use this script to test the connection.Thanks for that! Connect Successfully. Host info: localhost via TCP/IP That means my DB connection is working fine. but i still do not get the test samples from the site - with update , edit or delete in DB to work. Could it be that they are not working on CI 2.2.0? or something extra needed on that version? What would be the implications to upgrade to CI 3.X.X ? what are the Pros and Cons? is it still possible to run that on PHP 5.63? and MySQL 5? I am sort of lost here
One always learn new things!
just by chance i did a view source on my white page...... there i see html> <head> <title>Update Data In Database Using CodeIgniter</title> <link href='http://fonts.googleapis.com/css?family=Marcellus' rel='stylesheet' type='text/css'> <link rel="stylesheet" type="text/css" href="<br /> <b>Fatal error</b>: Call to undefined function base_url() in <b>C:\My_localhost\application\views\update_view.php</b> on line <b>5</b><br /> Then checking that line in update_view.php <link rel="stylesheet" type="text/css" href="<?php echo base_url(). "css/update.css" ?>"> After some more research Just adding url in the config/autoload.php $autoload['helper'] = array('url'); Then it is working..... ![]() just a little surprise that it would only show in view source...... (one lesson learned)
Yep, that always gets new users. Another one to remember is that you can always use your
web browsers development tools to find errors F12. Anyways glad that you found out your problem. 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 |