Welcome Guest, Not a member yet? Register   Sign In
Help with simple code!! :)
#1

[eluser]ssloxing[/eluser]
Hello I'm new to codeigniter and I have just a simple code here
blog.php:
Code:
<?php
class Blog extends Controller{

    function index()
    {
        echo "Test!";
    }

}
?>

I use xampp as "home server" and I just get a white page when I running this... Please Need help.. I think this is because of the xampp because it's working with wamp server at another place Smile

/ssloxing
#2

[eluser]joeizang[/eluser]
ssloxing,

why don’t you just do the proper thing and use a view instead of echoing?
Code:
class Blog extends Controller
{
   function Blog()
   {
     parent::Controller();
   }
  
   function index()
   {
     $this->load->view('viewfile');
   }
}
and then in your view just put what you want to a regular html file and save as php or an empty file and echo what yo
#3

[eluser]ssloxing[/eluser]
[quote author="joeizang" date="1259335938"]
Code:
class Blog extends Controller
{
   function Blog()
   {
     parent::Controller();
   }
  
   function index()
   {
     $this->load->view('viewfile');
   }
}
[/quote]

I've tryied that to and it doesn't work either :down: ...
#4

[eluser]ssloxing[/eluser]
Code:
<?php
class Blog extends Controller{

    function index()
    {
        echo "Test!";
    }

}
?>
This worked at home anyways where I use wamp server so you know Smile
So I don't need any more help, thnx anyway Smile




Theme © iAndrew 2016 - Forum software by © MyBB