[PHP-WEBMASTER] [web-php] master: Update header.inc (#1293)

Author: Adam Cable (adamcable)
Committer: GitHub (web-flow)
Pusher: sy-records
Date: 2025-07-24T17:24:28+08:00

Commit: Update header.inc (#1293) · php/web-php@52763bb · GitHub
Raw diff: PHP: <?php echo $title ?>

Update header.inc (#1293)

Co-authored-by: Luffy <lufei@php.net>

Changed paths:
  M include/header.inc

Diff:

diff --git a/include/header.inc b/include/header.inc
index 2f33d64c55..c31b73ebad 100644
--- a/include/header.inc
+++ b/include/header.inc
@@ -53,15 +53,23 @@ if (!isset($config["languages"])) {
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">

+ <?php if (!empty($_SERVER["BASE_HREF"])): ?>
+ <base href="<?php echo $_SERVER["BASE_HREF"]; ?>">
+ <?php endif ?>
+
   <title>PHP: <?php echo $title ?></title>

+ <?php foreach($CSS as $filename => $modified): ?>
+ <link rel="stylesheet" type="text/css" href="/cached.php?t=<?php echo $modified?>&amp;f=<?php echo $filename?>" media="screen">
+ <?php endforeach ?>
+
  <link rel="icon" type="image/svg+xml" sizes="any" href="<?php echo $MYSITE ?>favicon.svg?v=2">
  <link rel="icon" type="image/png" sizes="196x196" href="<?php echo $MYSITE ?>favicon-196x196.png?v=2">
  <link rel="icon" type="image/png" sizes="32x32" href="<?php echo $MYSITE ?>favicon-32x32.png?v=2">
  <link rel="icon" type="image/png" sizes="16x16" href="<?php echo $MYSITE ?>favicon-16x16.png?v=2">
  <link rel="shortcut icon" href="<?php echo $MYSITE ?>favicon.ico?v=2">

- <link rel="search" type="application/opensearchdescription+xml" href="PHP: Manual Quick Reference; title="Add PHP.net search">
+ <link rel="search" type="application/opensearchdescription+xml" href="PHP: Manual Quick Reference; title="Add PHP.net search">
  <link rel="alternate" type="application/atom+xml" href="<?php echo $MYSITE ?>releases/feed.php" title="PHP Release feed">
  <link rel="alternate" type="application/atom+xml" href="<?php echo $MYSITE ?>feed.atom" title="PHP: Hypertext Preprocessor">

@@ -81,14 +89,6 @@ if (!isset($config["languages"])) {
  <link rel="alternate" href="<?php echo $MYSITE ?>manual/<?php echo $code?>/<?php echo $config["thispage"] ?>" hreflang="<?php echo $code?>">
<?php endforeach ?>

-<?php foreach($CSS as $filename => $modified): ?>
-<link rel="stylesheet" type="text/css" href="/cached.php?t=<?php echo $modified?>&amp;f=<?php echo $filename?>" media="screen">
-<?php endforeach ?>
-
-<?php if (!empty($_SERVER["BASE_HREF"])): ?>
- <base href="<?php echo $_SERVER["BASE_HREF"] ?>">
-<?php endif ?>
-
<?php if (isset($config['meta_tags'])) { echo $config['meta_tags']; } ?>

<?php if (is_primary_site()) { ?>