I can not access application via uri class

#1
[eluser]Unknown[/eluser]
:cheese: Ok Im straight off the boat today.

Problem is that I can not get output as is suggested in hello world video tutorial.

so e.g. :

class Snore extends Controller
{
function hello (){echo "Hello World";}
}

index.php/classname/ will not output hello world

until I declare function in uri

index.php/classname/function/ works.

Is this correct?

#2
[eluser]Seppo[/eluser]
By the falt, it will look for the index method. So you have to do

Code:
class Snore extends Controller
{
  function Snore() {
    parent::Controller();
  }

  function index(){
    echo “Hello World”;
  }
}
and access to index.php/snore or index.php/snore/index

#3
[eluser]Michael Wales[/eluser]
Code:
class Snore extends Controller
{
function hello (){echo “Hello World”;}
}

To access that the URL would be: yourserver/index.php/snore/hello


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.