note 121194 added to function.method-exists
| From: | anom | Date: | Tue, 06 Jun 2017 20:41:57 +0000 |
| Subject: | note 121194 added to function.method-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-209127@lists.php.net to get a copy of this message | ||
<?php
session_start();
require_once __DIR__ . '/fuente/Modelo/articulo.php';
require_once __DIR__ . '/fuente/Modelo/usuario.php';
require_once __DIR__ . '/fuente/Controlador/defaultController.php';
require_once __DIR__ . '/fuente/Controlador/articuloController.php';
require_once __DIR__ . '/fuente/Controlador/usuariosController.php';
require_once __DIR__ . '/app/conf/rutas.php';
if (isset($_GET['ctl'])) {
if (isset($mapeoRutas[$_GET['ctl']])) {
$ruta = $_GET['ctl'];
} else {
header('Status: 404 Not Found');
echo '<html><body><h1>Error 404: No existe la ruta <i>' .
$_GET['ctl'] .
'</p></body></html>';
exit;
}
} else {
$ruta = 'inicio';
}
$controlador = $mapeoRutas[$ruta];
if (method_exists($controlador['controller'], $controlador['action'])) {
call_user_func(array(new $controlador['controller'],
$controlador['action']));
} else {
header('Status: 404 Not Found');
echo '<html><body><h1>Error 404: El controlador <i>' .
$controlador['controller'] .
'->' . $controlador['action'] .
'</i> no existe</h1></body></html>';
}
----
Server IP: 72.52.91.14
Probable Submitter: 85.219.9.59
----
Manual Page -- http://php.net/manual/en/function.method-exists.php
Edit -- https://master.php.net/note/edit/121194
Del: integrated -- https://master.php.net/note/delete/121194/integrated
Del: useless -- https://master.php.net/note/delete/121194/useless
Del: bad code -- https://master.php.net/note/delete/121194/bad+code
Del: spam -- https://master.php.net/note/delete/121194/spam
Del: non-english -- https://master.php.net/note/delete/121194/non-english
Del: in docs -- https://master.php.net/note/delete/121194/in+docs
Del: other reasons-- https://master.php.net/note/delete/121194
Reject -- https://master.php.net/note/reject/121194
Search -- https://master.php.net/manage/user-notes.php