Welcome Guest, Not a member yet? Register   Sign In
Repetitive URL
#6

[eluser]khagendra[/eluser]
[quote author="khagendra" date="1255560732"]This is not so bog problem. The reason may be as follows
1 suppose there is a function with parameter and if we are invoking this function without passing any arguments then the Severity: Warning will occur.

2. suppose there is a function with no parameter and if we are invoking this function passing any arguments then the function will executes ignoring the parameters.
so, http://sitename/controllerName/controllerName/ will executes as the index() function of the controller executes ignoring rest of the uri segment.

you can test this trying the code as i have explained.

Example1:

class Test extends Controller
{
function Test()
{
parent::Controller();
}

function index()
{
echo "ci forum";
}

function show($s)
{
echo $s;
}
}

Try with http://sitename/test/show, it will generates error.

Example2:

class Test extends Controller
{
function Test()
{
parent::Controller();
}

function index()
{
echo "ci forum";
}

function show()
{
echo "it will works";
}
}

Try with http://sitename/test/show/show/show, it will works.
hope this will help to understand.[/quote]


Messages In This Thread
Repetitive URL - by El Forum - 10-04-2009, 01:01 AM
Repetitive URL - by El Forum - 10-04-2009, 01:42 AM
Repetitive URL - by El Forum - 10-05-2009, 02:29 AM
Repetitive URL - by El Forum - 10-05-2009, 02:42 AM
Repetitive URL - by El Forum - 10-14-2009, 11:52 AM
Repetitive URL - by El Forum - 10-14-2009, 11:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB