Welcome Guest, Not a member yet? Register   Sign In
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




Theme © iAndrew 2016 - Forum software by © MyBB