If I want to execute a php script, i just point the browser to www.something.com/myscript.php
But if i want to execute a specific function inside
Try this one
$urlParams = explode('/', $_SERVER['REQUEST_URI']);
$functionName = $urlParams[2];
$functionName($urlParams);
function func1 ($urlParams) {
echo "In func1";
}
function func2 ($urlParams) {
echo "In func2";
echo "
Argument 1 -> ".$urlParams[3];
echo "
Argument 2 -> ".$urlParams[4];
}
and the urls can be as below
http://domain.com/url.php/func1
http://domain.com/url.php/func2/arg1/arg2