本文整理汇总了PHP中require_controller函数的典型用法代码示例。如果您正苦于以下问题:PHP require_controller函数的具体用法?PHP require_controller怎么用?PHP require_controller使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了require_controller函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: boot
function boot()
{
try {
// configで動作
$Rooter = new Rooter();
$matches = $Rooter->matche_pattern();
$controller = ucfirst($matches['controller']);
$method = $matches['method'];
a();
// controllerの読み込みと実行
require_controller($controller);
$class_name = "\\Aqua\\Controller\\{$controller}";
$Class = new $class_name();
$Class->{$method}();
} catch (Exception $e) {
echo "gtetea";
var_dump($e->getMessage());
}
}
示例2: dirname
<?php
include "fragment/head.php";
?>
<body>
<div id="wrapper">
<?php
include "fragment/header.php";
?>
<?php
require_once dirname(__FILE__) . '\\..\\util.php';
require_controller('inboxController');
use Qnet\Controller\InboxController;
$controller = new InboxController();
// display each message title, with a link to their content
echo '<ul>';
while ($controller->hasMoreMessages()) {
$controller->nextMessage();
$date = $controller->getDate() . '';
$date = substr($date, 0, 10);
echo $date . ' ';
echo '<a href="read_message.php?messageid=' . $controller->getMid() . '">' . $controller->getTitle() . '</a>';
if (!$controller->isRead()) {
echo ' (New)';
}
echo '<br/>';
}
echo '</ul>';
?>
示例3: dirname
<?php
require_once dirname(__FILE__) . '\\..\\util.php';
require_controller("sessionController");
use Qnet\Controller\SessionController;
$session = new SessionController();
if ($session->isLoggedIn()) {
header("Location: /Qnet/target/classes/php/qnet/ui/viewprofile.php");
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
</body>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Qnet Login</title>
<link rel="shortcut icon" href="/favicon.ico">
<link rel="stylesheet" type="text/css" href="login.css"/>
</head>
<body>
<form action="loginFrontend.php" method="post">
<fieldset>
<legend>Log in</legend>
示例4: dirname
<?php
include_once dirname(__FILE__) . '\\..\\util.php';
require_controller("forgetController");
use Qnet\Controller\ForgetController;
$c = new ForgetController();
$uid = $c->recover($_POST['mail']);
if ($uid != -1) {
header("Location: /Qnet/target/classes/php/qnet/ui/login.php?sended=true");
} else {
header("Location: /Qnet/target/classes/php/qnet/ui/forget.php?error=true");
}
示例5: dirname
<?php
include "fragment/head.php";
?>
<body>
<div id="wrapper">
<?php
include "fragment/header.php";
?>
<?php
require_once dirname(__FILE__) . '\\..\\util.php';
require_controller('listqueriescontroller');
require_controller('profilecontroller');
require_controller('photoController');
use Qnet\Controller\ListQueriesController;
$controller = new ListQueriesController();
use Qnet\Controller\PhotoController;
$photoController = new PhotoController();
$photoPath = $photoController->getPhoto();
?>
<div id="page">
<div id="content">
<div class="post">
<h2 class="title">Select a query to answer!</h2>
<div class="entry">
<?php
while ($controller->hasMoreQueries()) {
$controller->nextQuery();
echo '<p>' . $controller->getQueryLink() . '</p>';
}
示例6: dirname
<?php
include "fragment/head.php";
?>
<body>
<div id="wrapper">
<?php
include "fragment/header.php";
?>
<?php
require_once dirname(__FILE__) . '\\..\\util.php';
require_controller('answers\\answerquerycontroller');
require_model('User');
use Qnet\Controller\AnswerQueryController;
use Qnet\Model\User;
$controller = new AnswerQueryController();
?>
<div id="page">
<div id="content">
<div class="post">
<h2 class="title">Generate online statistics!</h2>
<div class="entry">
<?php
if ($_GET['commit'] == 'ok') {
echo '<p>Congratulations! Your statistic has been published.<p>';
}
?>
<p>
示例7: dirname
<?php
include_once dirname(__FILE__) . '\\..\\util.php';
require_controller("loginController");
use Qnet\Controller\LoginController;
$c = new LoginController();
$uid = $c->login($_POST['userName'], $_POST['userPass']);
if ($uid != -1) {
header("Location: /Qnet/target/classes/php/qnet/ui/viewprofile.php");
} else {
header("Location: /Qnet/target/classes/php/qnet/ui/login.php?error=true");
}
示例8: dirname
<?php
namespace Qnet\Controller;
require_once dirname(__FILE__) . '\\..\\..\\util.php';
require_dao('QueryDAO');
require_controller('listqueriescontroller');
require_dao('userDAO');
use Qnet\Dao\QueryDAO;
use Qnet\Dao\UserDAO;
use Qnet\Controller\ListQueriesController;
$searchQuery = $_GET["q"];
if ($searchQuery != null) {
$userDaoIns = new QueryDAO();
$queriesArray = $userDaoIns->getQueriesByPartialString($searchQuery);
$uid = getUID();
$udao = new UserDAO();
$queriesArray = ListQueriesController::filterQueries($queriesArray, $udao->selectUserById($uid));
$arraySize = count($queriesArray);
$answer = "";
foreach (array_values($queriesArray) as $queryname) {
$answer = $answer . $queryname . "\n";
}
echo $answer;
}
示例9: dirname
<?php
/**
* Created by IntelliJ IDEA.
* User: Tomas Alabes
* Date: 15/09/2010
* Time: 18:13:23
* To change this template use File | Settings | File Templates.
*/
require_once dirname(__FILE__) . '\\..\\util.php';
require_abs('images/graphs/phpgraphlib.php');
require_abs('images/graphs/phpgraphlib_pie.php');
require_controller('statisticsGraphicsController');
use Qnet\Controller\StatisticsGraphicsController;
for ($i = 1; $i < 4; $i++) {
$sid = $i;
$ctrl = new StatisticsGraphicsController();
$ctrl->computeStatistic($sid);
if (!$ctrl->isDrawable()) {
echo 'Cannot draw this statistic.';
}
$ctrl->getData(0);
$ctrl->getData(1);
$ctrl->getData(2);
$ctrl->getData(3);
$ctrl->getData(4);
if ($ctrl->hasZ()) {
$ctrl->getLegend(0);
$ctrl->getLegend(1);
$ctrl->getLegend(2);
$ctrl->getLegend(3);
示例10: dirname
<?php
require_once dirname(__FILE__) . '\\..\\util.php';
check_session();
$controller = $_GET['target'];
require_controller($controller);
示例11: dirname
<?php
include "fragment/head.php";
?>
<body>
<div id="wrapper">
<?php
include "fragment/header.php";
// require 'database.php';
require_once dirname(__FILE__) . '\\..\\util.php';
require_controller('inboxReadController');
use Qnet\Controller\InboxReadController;
$controller = new InboxReadController();
$title = $controller->getTitle();
$from = $controller->getFrom();
$content = $controller->getContent();
?>
<form action="bridge.php?target=replyController" method="POST">
<label> Title: </label> <br/>
<input type="text" value="<?php
echo $title;
?>
" name="title" id="title" readonly="true"> <br/>
<label> From: </label> <br/>
示例12: dirname
<?php
include_once dirname(__FILE__) . '\\..\\util.php';
require_controller("logoutController");
use Qnet\Controller\LogoutController;
$c = new LogoutController();
$uid = $c->logout();
header("Location: /Qnet/target/classes/php/qnet/ui/login.php");
示例13: dirname
<?php
require_once dirname(__FILE__) . '\\..\\..\\util.php';
require_controller("headerController");
use Qnet\Controller\HeaderController;
$header = new HeaderController();
echo '<div id="header">
<div id="menu">
<ul>
<li><a href="viewprofile.php">Home</a></li>
<li><a href="viewprofile.php">Profile</a></li>';
echo '<li><a href="newquery.php">Create Poll</a></li>';
echo '
<li><a href="listqueries.php">Answer Polls</a></li>
<li><a href="bridge.php?target=logoutFrontend">Logout</a></li>
<li></li>
<li></li>
<li></li>
<li>Welcome ';
echo $header->getSessionName();
echo '.</li>
</ul>
</div>
<!-- end #menu -->
<div id="search">
<form method="get" action="listqueries.php">
<fieldset>
<input type="text" class="inputs"name="searchQuery" id="searchQuery" size="15" width="80px"/>
<input class="searchButton" type="submit" value="Search Query"/>
</fieldset>
</form>