本文整理汇总了PHP中FileManager::getServerPath方法的典型用法代码示例。如果您正苦于以下问题:PHP FileManager::getServerPath方法的具体用法?PHP FileManager::getServerPath怎么用?PHP FileManager::getServerPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileManager
的用法示例。
在下文中一共展示了FileManager::getServerPath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFullPermalink
function getFullPermalink()
{
require_once "file_manager.php";
$s = FileManager::getServerPath();
$s .= dirname($_SERVER["PHP_SELF"]);
$s .= "/";
$s .= $this->getPermalink();
return $s;
}
示例2: doPostAction
private static function doPostAction($request)
{
require_once 'post/PostManager.php';
if (isset(self::$currentID) && self::$currentID != null) {
self::$currentObject = PostManager::loadPostByPermalink(self::$currentID);
}
//echo "<p>" . $request["action"] . "</p>"; //DEBUG
switch (self::$requestedAction) {
//modifica, vota, commenta, elimina, subscribe o aggiungi a una collezione il post
case "Read":
//echo "<p><font color='green'>" . $request["permalink"] . "</font></p>"; //DEBUG
require_once "post/PostPage.php";
PostPage::showPost(self::$currentObject, self::$post_options);
break;
case "Edit":
//echo "<p><font color='green'>REQUEST TO LOAD " . $request["script"] . " by: " . $author->getNickname() . ", with the title of: " . $request["posttitle"] . ", created the day: " . date("d/m/Y", $request["postday"]) . "</font></p>"; //DEBUG
require_once "post/PostPage.php";
PostPage::showEditPostForm(self::$currentObject);
break;
case "Vote":
//echo "<p><font color='green'>REQUEST TO LOAD " . $request["script"] . " by: " . $author->getNickname() . ", with the title of: " . $request["posttitle"] . ", created the day: " . date("d/m/Y", $request["postday"]) . "</font></p>"; //DEBUG
require_once "post/PostPage.php";
//controllo su vote.
if (isset($_GET["vote"])) {
if ($_GET["vote"] == "y" || $_GET["vote"] == "yes") {
$vote = true;
}
if ($_GET["vote"] == "n" || $_GET["vote"] == "no") {
$vote = false;
}
if (!isset($_GET["vote"])) {
header("location: " . FileManager::appendToRootPath("error.php?error=Oops, il voto da te inserito non è valido."));
}
PostManager::votePost(self::$user->getID(), self::$currentObject, $vote);
}
PostPage::showPost(self::$currentObject, self::$post_options);
break;
case "Comment":
//echo "<p><font color='green'>REQUEST TO LOAD " . $request["script"] . " by: " . $author->getNickname() . ", with the title of: " . $request["posttitle"] . ", created the day: " . date("d/m/Y", $request["postday"]) . "</font></p>"; //DEBUG
require_once "post/PostPage.php";
PostPage::showComments(self::$currentObject);
break;
case "Delete":
//echo "<p><font color='green'>REQUEST TO LOAD " . $request["script"] . " by: " . $author->getNickname() . ", with the title of: " . $request["posttitle"] . ", created the day: " . date("d/m/Y", $request["postday"]) . "</font></p>"; //DEBUG
require_once "post/PostPage.php";
PostManager::deletePost(self::$currentObject);
header("location: " . FileManager::getServerPath());
break;
case "Subscribe":
//echo "<p><font color='green'>REQUEST TO LOAD " . $request["script"] . " by: " . $author->getNickname() . ", with the title of: " . $request["posttitle"] . ", created the day: " . date("d/m/Y", $request["postday"]) . "</font></p>"; //DEBUG
require_once "post/PostPage.php";
PostPage::showContestForm(self::$currentObject);
break;
case "AddToCollection":
//echo "<p><font color='green'>REQUEST TO LOAD " . $request["script"] . " by: " . $author->getNickname() . ", with the title of: " . $request["posttitle"] . ", created the day: " . date("d/m/Y", $request["postday"]) . "</font></p>"; //DEBUG
require_once "post/PostPage.php";
PostPage::showCollectionForm(self::$currentObject);
break;
case "New":
require_once "post/PostPage.php";
PostPage::showNewPostForm();
break;
case "Search":
default:
require_once "search/SearchPage.php";
SearchPage::showPostSearchForm();
break;
}
}