mirror of
https://github.com/php/web-php.git
synced 2026-03-23 23:02:13 +01:00
Swap uses of _SERVER[DOCUMENT_ROOT] for __DIR__
2/4 - Update remaining except archives/ and release/.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// Simulate a /backend shortcut call (which will lead to a manual page)
|
||||
$_SERVER['REQUEST_URI'] = '/backend';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/error.php';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
include_once __DIR__ . '/../error.php';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// Simulate a /bin shortcut call (which will lead to a manual page)
|
||||
$_SERVER['REQUEST_URI'] = '/bin';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/error.php';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
include_once __DIR__ . '/../error.php';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
$_SERVER['BASE_PAGE'] = 'conferences/index.php';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/pregen-news.inc';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
include_once __DIR__ . '/../include/pregen-news.inc';
|
||||
|
||||
|
||||
mirror_setcookie("LAST_NEWS", $_SERVER["REQUEST_TIME"], 60*60*24*365);
|
||||
|
||||
@@ -149,7 +149,7 @@ if (preg_match("!^get/([^/]+)/from/([^/]+)(/mirror)?$!", $URI, $dlinfo)) {
|
||||
}
|
||||
|
||||
// Start the download process
|
||||
include $_SERVER['DOCUMENT_ROOT'] . "/include/do-download.inc";
|
||||
include __DIR__ . "/include/do-download.inc";
|
||||
$filename = get_actual_download_file($df);
|
||||
if ($filename) {
|
||||
status_header(200);
|
||||
@@ -157,7 +157,7 @@ if (preg_match("!^get/([^/]+)/from/([^/]+)(/mirror)?$!", $URI, $dlinfo)) {
|
||||
} else {
|
||||
status_header(404);
|
||||
/* The file didn't exist on this server.. ask the user to pick another mirror */
|
||||
include $_SERVER['DOCUMENT_ROOT'] . "/include/get-download.inc";
|
||||
include __DIR__ . "/include/get-download.inc";
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
|
||||
$now = $_SERVER["REQUEST_TIME"];
|
||||
if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"])) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// Simulate a /images shortcut call (which will lead to a manual page)
|
||||
$_SERVER['REQUEST_URI'] = '/images';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/error.php';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
include_once __DIR__ . '/../error.php';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/branches.inc';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
include_once __DIR__ . '/../include/branches.inc';
|
||||
|
||||
// Sizing constants.
|
||||
$margin_left = 80;
|
||||
|
||||
@@ -7,7 +7,7 @@ if (!isset($_GET["lang"])) {
|
||||
if (empty($_SERVER["DOCUMENT_ROOT"])) {
|
||||
$_SERVER["DOCUMENT_ROOT"] = __DIR__ . "/../";
|
||||
}
|
||||
include $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include __DIR__ . '/../include/prepend.inc';
|
||||
if (!isset($ACTIVE_ONLINE_LANGUAGES[$_GET["lang"]])) {
|
||||
header("Location: http://php.net");
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$_SERVER['BASE_PAGE'] = 'license/contrib-guidelines-code.php';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
site_header("License Information", array("current" => "help"));
|
||||
?>
|
||||
<h2>PHP Contributor Guidelines for Code Developers</h2>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$_SERVER['BASE_PAGE'] = 'license/distrib-guidelines-code.php';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
site_header("License Information", array("current" => "help"));
|
||||
?>
|
||||
<h2>PHP Distribution Guidelines</h2>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$_SERVER['BASE_PAGE'] = 'license/index.php';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
|
||||
$SIDEBAR_DATA = <<<EOF
|
||||
<aside>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
$ip_spam_lookup_url = 'http://www.dnsbl.info/dnsbl-database-check.php?IP=';
|
||||
|
||||
$_SERVER['BASE_PAGE'] = 'manual/add-note.php';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/posttohost.inc';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
|
||||
include $_SERVER['DOCUMENT_ROOT'] . '/manual/spam_challenge.php';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
include_once __DIR__ . '/../include/posttohost.inc';
|
||||
include_once __DIR__ . '/../include/shared-manual.inc';
|
||||
include __DIR__ . '/spam_challenge.php';
|
||||
|
||||
site_header("Add Manual Note", array( 'css' => 'add-note.css'));
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
|
||||
$page = isset($_GET['page']) ? htmlspecialchars($_GET['page'], ENT_QUOTES, 'UTF-8') : '';
|
||||
$page = strtr($page, array("\r"=>"","\n"=>""));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
|
||||
include_once __DIR__ . '/../../include/shared-manual.inc';
|
||||
$TOC = array();
|
||||
$PARENTS = array();
|
||||
include_once __DIR__ ."/toc/refs.basic.vartype.inc";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
|
||||
include_once __DIR__ . '/../../include/shared-manual.inc';
|
||||
$TOC = array();
|
||||
$PARENTS = array();
|
||||
include_once __DIR__ ."/toc/reserved.exceptions.inc";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
|
||||
include_once __DIR__ . '/../../include/shared-manual.inc';
|
||||
$TOC = array();
|
||||
$PARENTS = array();
|
||||
include_once __DIR__ ."/toc/context.inc";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
|
||||
include_once __DIR__ . '/../../include/shared-manual.inc';
|
||||
$TOC = array();
|
||||
$PARENTS = array();
|
||||
include_once __DIR__ ."/toc/index.inc";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
|
||||
include_once __DIR__ . '/../../include/shared-manual.inc';
|
||||
$TOC = array();
|
||||
$PARENTS = array();
|
||||
include_once __DIR__ ."/toc/ref.strings.inc";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
|
||||
include_once __DIR__ . '/../../include/shared-manual.inc';
|
||||
$TOC = array();
|
||||
$PARENTS = array();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
|
||||
include_once __DIR__ . '/../../include/shared-manual.inc';
|
||||
$TOC = array();
|
||||
$PARENTS = array();
|
||||
include_once __DIR__ ."/toc/langref.inc";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
|
||||
include_once __DIR__ . '/../../include/shared-manual.inc';
|
||||
$TOC = array();
|
||||
$PARENTS = array();
|
||||
include_once __DIR__ ."/toc/funcref.inc";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
$_SERVER['BASE_PAGE'] = 'manual/help-translate.php';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
include_once __DIR__ . '/../include/shared-manual.inc';
|
||||
site_header("Help translate the PHP Manual");
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
mirror_redirect("/manual/$LANG/index.php");
|
||||
?>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$_SERVER['BASE_PAGE'] = 'manual/php3.php';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
site_header('PHP Version 3 Documentation');
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$_SERVER['BASE_PAGE'] = 'manual/php4.php';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
site_header('PHP Version 4 Documentation');
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$_SERVER['BASE_PAGE'] = 'manual/phpfi2.php';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
site_header('PHP/FI Version 2.0 Documentation');
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
$_SERVER['BASE_PAGE'] = 'manual/vote-note.php';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/posttohost.inc';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
|
||||
include $_SERVER['DOCUMENT_ROOT'] . '/manual/spam_challenge.php';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
include_once __DIR__ . '/../include/posttohost.inc';
|
||||
include_once __DIR__ . '/../include/shared-manual.inc';
|
||||
include __DIR__ . '/spam_challenge.php';
|
||||
|
||||
// Initialize global variables
|
||||
$error = false;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// Simulate a /pear shortcut call (which will lead to a manual page)
|
||||
$_SERVER['REQUEST_URI'] = '/pear';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/error.php';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
include_once __DIR__ . '/../error.php';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$_SERVER['BASE_PAGE'] = 'security/index.php';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
|
||||
site_header("CRYPT_BLOWFISH security fix details");
|
||||
?>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
$_SERVER['BASE_PAGE'] = 'security/index.php';
|
||||
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
if(!isset($_COOKIE["MAGIC_COOKIE"])) {
|
||||
mirror_redirect("/manual/security");
|
||||
exit;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
which means there is no local search is set up
|
||||
*/
|
||||
$_SERVER['BASE_PAGE'] = 'stats/index.php';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
site_header("No Stats");
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// Simulate a /styles shortcut call (which will lead to a manual page)
|
||||
$_SERVER['REQUEST_URI'] = '/styles';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
include_once $_SERVER['DOCUMENT_ROOT'] . '/error.php';
|
||||
include_once __DIR__ . '/../include/prepend.inc';
|
||||
include_once __DIR__ . '/../error.php';
|
||||
|
||||
Reference in New Issue
Block a user