soy nuevo en php y tengo este problema con mi codigo:
Fatal error: Uncaught Error: Call to undefined function call_user_method()...
es sin dudas un problema con php dado que ee aparentemente por una función que ya no se usa desde 4.1, pero usando php 5.3 y me dice:
Deprecated: Function call_user_method() is deprecated in C:\xampp\htdocs\rlra-php-master\app\core\Lb.php on line 45
pego el código que me marca el problema acá:
<?php
class Lb {
public function Lb(){
$this->get = new Get();
$this->post = new Post();
$this->request = new Request();
$this->cookie = new Cookie();
$this->session = new Session();
$this->default_controller ="index";
$this->default_view ="index";
}
public function loadModule($module){
if(!isset($_GET['module'])){
if(isset($_GET["r"])){
$d = explode("/", $_GET["r"]);
if(count($d)!=2){
echo "Invalid R parameters";
exit;
}else{
if($d[0]!=""&&$d[1]!=""){
$this->default_controller = $d[0];
$this->default_view = $d[1];
}
}
}
$this->default_controller = $this->default_controller."Controller";
require_once "app/controllers/".$this->default_controller.".php";
$controller = new $this->default_controller;
$method = $this->default_view."Action";
if(method_exists($controller, $method)){
$data = call_user_method($method, $controller);
}else{
echo "<b>".$method."</b> not found in ".$this->default_controller;
}
}else{
}
}
}a
?>