本文整理汇总了PHP中controller::Index方法的典型用法代码示例。如果您正苦于以下问题:PHP controller::Index方法的具体用法?PHP controller::Index怎么用?PHP controller::Index使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类controller
的用法示例。
在下文中一共展示了controller::Index方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: controller
<?php
require_once "model/db.php";
require_once "controller/controller.php";
// Todo esta lógica hara el papel de un FrontController
if (!isset($_REQUEST['c'])) {
$controller = new controller();
$controller->Index();
} else {
// Obtenemos el controlador que queremos cargar
$controller = $_REQUEST['c'];
$accion = isset($_REQUEST['a']) ? $_REQUEST['a'] : 'Index';
// Instanciamos el controlador
$controller = new controller();
// Llama la accion
call_user_func(array($controller, $accion));
}
示例2: recoverPass
public function recoverPass()
{
$subject = "FAST PRICE RECOVER PASS";
$p = "";
$destino = $_REQUEST['email'];
$datos = $this->myModel->recover_pass($_REQUEST['email']);
foreach ($datos as $dato) {
$p = $dato['pass'];
}
$myMsn = "Excelente dia!! Tu password es: " . $p;
try {
mail($destino, $subject, $myMsn);
} catch (Exception $e) {
echo "Error:" . $e;
}
$myController = new controller();
$myController->Index();
}