Inhaltsverzeichnis
1、更改<title>
2、更改样式表style.css路径
1. Ändern Sie <title>
2 Ändern Sie den Stylesheet style.css path< /strong>
3、添加pingback
4、更改博客名称和描述
5、添加订阅feed链接
6、添加wp_head
7、添加Description 和 Keywords
8、显示菜单栏
9. Aktualisieren Sie den Cache
总结
Zusammenfassung
Heim CMS-Tutorial WordDrücken Sie Der gesamte Prozess der WordPress-Theme-Erstellung (5): header.php erstellen

Der gesamte Prozess der WordPress-Theme-Erstellung (5): header.php erstellen

Feb 21, 2023 am 10:21 AM
php wordpress

Ich habe Ihnen „Der gesamte Prozess der WordPress-Theme-Produktion (4): Ein kleiner Test“ vorgestellt Schauen Sie es sich gemeinsam an. Nun ~

Sie können versuchen, die Datei .html zu öffnen, die Sie von WordPress Theme Production Whole Process (3): HTML Static Template Production heruntergeladen haben Ich frage mich, ob Sie die Codes in allen Teilen gefunden haben, die sehr ähnlich sind. Tatsächlich können wir diesen Teil eines ähnlichen Codes extrahieren und in eine separate Datei header.php einfügen. Wenn jede Seite diesen Teil des Codes verwenden möchte, verwenden Sie PHPs include() Oder fügen Sie WordPresss <code>get_header() ein. Dieser Teil des Codes muss auf jeder Seite in der Provinz geschrieben werden. .html 文件,不知道你有没有发现他们头部的代码都非常的相似呢?其实我们可以提取这部分相似的代码,放到一个单独的文件header.php中,各个页面想用这部分代码的时候再用php的include()或者WordPress的get_header()包含进去,省的每个页面里面都要写这部分代码,更改起来也可以达到一改全改的目的。

再次提醒:如果你不打算动手编写代码,这个系列教程就别看了,对你无益!

接着我们上次创建的主题目录wp-contentthemesAurelius,在该目录下新建一个php文件header.php,我们提取出index.php中的头部代码复制粘贴到header.php中,下面的代码就是目前header.php中的所有代码了(当然不同主题的头部代码都是不一样,在你实际的项目中可以自定决定):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Aurelius | Blog</title>
<!-- Stylesheets -->
<link rel="stylesheet" href="./style.css" type="text/css" media="screen" />
</head>
<body>
<div id="wrapper" class="container_12 clearfix">
	<!-- Text Logo -->
	<h1 id="logo" class="grid_4">Aurelius</h1>
	<!-- Navigation Menu -->
	<ul id="navigation" class="grid_8">
		<li><a href="contact.html"><span class="meta">Get in touch</span><br />
			Contact Us</a></li>
		<li><a href="blog.html" class="current"><span class="meta">Latest news</span><br />
			Blog</a></li>
		<li><a href="index.html"><span class="meta">Homepage</span><br />
			Home</a></li>
	</ul>
	<div class="hr grid_12 clearfix"> </div>
	<!-- Caption Line -->
	<h2 class="grid_12 caption clearfix">Our <span>blog</span>, keeping you up-to-date on our latest news.</h2>
	<div class="hr grid_12 clearfix"> </div>
Nach dem Login kopieren

再用文本编辑器打开index.phparchive.phpcontact.phpfull_width.phppage.phpsingle.php,删掉以上类似代码,改成:

&lt;?php get_header(); ?&gt;
Nach dem Login kopieren

好,现在打开你的测试博客主页,看看我们制作的主题是否还可以正常工作,答案是可以的,跟原来几乎没什么两样,但还是一片混乱。get_header()就相当于将header.php中的代码拷贝到当前的php文件。接下来,我们将仔细探讨header.php中的动态内容。header.php将会被所有的模板页面(主页、分类页、页面、标签页等)所包含,所以header.php中代码应该是动态,适合不同页面的,所以这里面需要用到PHP代码,而不是单纯的HTML。下面让我们一起来修改header.php

1、更改</strong></h3><p>我们都知道不同页面的title都是不一样,而且title的设置还会直接影响到SEO的效果,所以这里应该谨慎设置。下面提供一种SEO优化的title写法,将<code><title>Aurelius | Blog</title></code>改成:</p><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'><title><?php if ( is_home() ) { bloginfo(&#39;name&#39;); echo " - "; bloginfo(&#39;description&#39;); } elseif ( is_category() ) { single_cat_title(); echo " - "; bloginfo(&#39;name&#39;); } elseif (is_single() || is_page() ) { single_post_title(); } elseif (is_search() ) { echo "搜索结果"; echo " - "; bloginfo(&#39;name&#39;); } elseif (is_404() ) { echo &#39;页面未找到!&#39;; } else { wp_title(&#39;&#39;,true); } ?></title></pre><div class="contentsignin">Nach dem Login kopieren</div></div><p>以上添加的php代码运用了条件判断,针对不同的页面采用不同title,这里解释一下这几个条件标签。</p><ul><li><code>is_home()</code>:当前页面为主页时返回true</li><li><code>is_category()</code>:当前页面为分类页时返回true</li><li><code>is_single()</code>:当前页面为单文章页时返回true</li><li><code>is_page()</code>:当前页面为单页面时返回true</li></ul><p>到目前为止,可能你对这些条件判断标签还没有深入的认识,也搞不懂到底是用了这些标签会对主题造成怎样的影响的,随着我们教程的进一步深入,你会慢慢理解的。如果你不喜欢上面title的写法,可以自行上网搜索相关代码:<code>WordPress SEO title</code></p><h3 id="strong-更改样式表style-css路径-strong"><strong>2、更改样式表style.css路径</strong></h3><p>在此之前你看到的首页都是混乱的,原因是还没加载css样式。现在我们一起把样式加上。你可以在<code>header.php</code>中找到这一段代码:</p><div rel="HTML" class="code"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'><link rel="stylesheet" href="./style.css" type="text/css" media="screen" /></pre><div class="contentsignin">Nach dem Login kopieren</div></div></div><p>聪明的你可能问:<code>wp-contentthemesAurelius</code>目录下不是已经有一个 <code>style.css</code> 吗?那为什么 <code>header.php</code></p><strong>Erinnern Sie sich noch einmal:</strong> Wenn Sie nicht vorhaben, Code zu schreiben, lesen Sie diese Tutorialreihe nicht, sie wird Ihnen nicht weiterhelfen! <div rel="PHP" class="code"></div>Gehen Sie in das Theme-Verzeichnis <code>wp-contentthemesAurelius</code>, das wir letztes Mal erstellt haben, erstellen Sie eine neue PHP-Datei <code>header.php</code> in diesem Verzeichnis und extrahieren Sie <code>index.php< Kopieren Sie den Header-Code in /code> und fügen Sie ihn in <code>header.php</code> ein. Der folgende Code ist derzeit der gesamte Code in <code>header.php</code> (natürlich die Header verschiedener Themen). Codes sind alle unterschiedlich, Sie können sie in Ihrem tatsächlichen Projekt anpassen): 🎜<div rel="HTML" class="code"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'><link rel="stylesheet" href="<?php bloginfo(&#39;stylesheet_url&#39;); ?>" type="text/css" media="screen" /></pre><div class="contentsignin">Nach dem Login kopieren</div></div>🎜🎜 Dann verwenden Sie einen Texteditor, um <code>index.php</code > zu öffnen, <code>archive.php</code>, <code>contact.php</code>, <code>full_width.php</code>, <code>page.php</code> und <code>single .php </code>, lösche den obigen ähnlichen Code und ändere ihn in: 🎜🎜<div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'><link rel="pingback" href="<?php bloginfo(&#39;pingback_url&#39;); ?>" /></pre><div class="contentsignin">Nach dem Login kopieren</div></div><div class="contentsignin">Nach dem Login kopieren</div></div>🎜🎜Okay, öffne jetzt deine Test-Blog-Homepage, um zu sehen, ob das von uns erstellte Theme noch normal funktionieren kann. Die Antwort ist ja, genau wie das ursprüngliche Pretty weitgehend das Gleiche, aber immer noch Chaos. <code>get_header()</code> entspricht dem Kopieren des Codes in <code>header.php</code> in die aktuelle PHP-Datei. Als nächstes schauen wir uns den dynamischen Inhalt in <code>header.php</code> genauer an. <code>header.php</code> wird in alle Vorlagenseiten (Homepage, Kategorieseiten, Seiten, Registerkarten usw.) eingebunden, daher sollte der Code in <code>header.php</code> dynamisch und geeignet sein Für verschiedene Seiten muss daher PHP-Code anstelle von einfachem HTML verwendet werden. Lassen Sie uns gemeinsam <code>header.php</code> ändern: 🎜<h3 id="strong-Ändern-Sie-lt-title-gt-strong"><strong>1. Ändern Sie <title></strong></h3>🎜Wir alle kennen die Titel von Verschiedene Seiten sind unterschiedlich und die Einstellung des Titels wirkt sich direkt auf den SEO-Effekt aus. Daher sollten Sie ihn hier sorgfältig festlegen. Im Folgenden finden Sie eine SEO-optimierte Methode zum Schreiben von Titeln Titel finden Sie hier eine Erklärung dieser bedingten Tags. 🎜<ul><li><code>is_home()</code>: Gibt „true“ zurück, wenn die aktuelle Seite die Startseite ist.</li><li><code>is_category()</code>: Gibt „true“ zurück, wenn die aktuelle Seite ist ist eine Kategorieseite true</li><li><code>is_single()</code>: Gibt true zurück, wenn die aktuelle Seite eine einzelne Artikelseite ist</li><li><code>is_page()</code >: Die aktuelle Seite ist eine einzelne Artikelseite. Gibt „true“ zurück, wenn die Seite angezeigt wird</li></ul>🎜Bisher haben Sie möglicherweise kein tiefes Verständnis für diese bedingten Beurteilungs-Tags und verstehen es nicht Wie sich die Verwendung dieser Tags auf das Thema auswirkt, werden Sie im Laufe des Tutorials langsam verstehen. Wenn Ihnen die Schreibweise des Titels oben nicht gefällt, können Sie den entsprechenden Code online suchen: <code>WordPress SEO title</code>🎜<h3 id="strong-Ändern-Sie-den-Stylesheet-style-css-path-strong"><strong>2 Ändern Sie den Stylesheet style.css path< /strong></h3>🎜Die Homepage, die Sie zuvor gesehen haben, ist im Chaos, weil der CSS-Stil noch nicht geladen wurde. Jetzt fügen wir die Stile zusammen. Sie finden diesen Code in <code>header.php</code>: 🎜<div rel="HTML" class="code"><div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'><h1 id="logo" class="grid_4">Aurelius</h1> <h2 class="grid_12 caption clearfix">Our <span>blog</span>, keeping you up-to-date on our latest news.</h2></pre><div class="contentsignin">Nach dem Login kopieren</div></div><div class="contentsignin">Nach dem Login kopieren</div></div>🎜🎜Wenn Sie schlau sind, fragen Sie sich vielleicht: <code>wp- contentthemesAurelius</ Gibt es nicht bereits eine <code>style.css</code> im code>-Verzeichnis? Warum lädt <code>header.php</code> kein CSS? Wie Sie im Ergebnis sehen können, ist die Seite durcheinander und Sie können sicher sein, dass das CSS nicht geladen ist. Da es sich um ein Thema von WordPress handelt, muss es vom Hauptprogramm von WordPress aufgerufen werden, und Ihr Blog kann nach mehreren Analyseebenen angezeigt werden, anstatt einer einfachen statischen HTML-Webseitendatei. Richtige Änderung: 🎜🎜<div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'><h1 id="logo" class="grid_4"><a href="<?php echo get_option(&#39;home&#39;); ?>/"><?php bloginfo(&#39;name&#39;); ?></a></h1> <h2 class="grid_12 caption clearfix"><?php bloginfo(&#39;description&#39;); ?></h2></pre><div class="contentsignin">Nach dem Login kopieren</div></div><div class="contentsignin">Nach dem Login kopieren</div></div>🎜<p><code>bloginfo(&#39;stylesheet_url&#39;)</code>输出的是你的主题css文件绝对网址,如http://localhost/wp/wp-content/themes/Aurelius/style.css,WordPress程序会自动识别你的WordPress安装地址,当前启用的主题,自动输出这个style.css链接。现在你可以试着更改一下,然后刷新一下你的博客首页,查看网页源代码,style.css的链接是不是变成你的了?页面是否可以正常显示了呢?</p><p>如果你的css文件不是style.css,且不是在主题根目录下,那怎么办呢?我们可以用<code><?php bloginfo(&#39;template_url&#39;); ?></code>来获取主题根目录的URL,如你的主题css文件是<code>abc.css</code>,那么我们可以这样写:<code><?php bloginfo(&#39;template_url&#39;); ?>/abc.css</code>,如果是在子目录css下那就这样:<code><?php bloginfo(&#39;template_url&#39;); ?>/css/abc.css</code>。同样加载js文件也是这样。</p><p>不过,还有几张图片的路径不对,还不能显示出来,现在我们一起用文本编辑器打开<code>index.php</code>、<code>archive.php</code>、<code>contact.php</code>、<code>full_width.php</code>、<code>page.php</code>和<code>single.php</code>,给这些图片加上正确的URL,搜索代码,将所有的:<code>src="images/</code>,批量替换成<code>src="<?php bloginfo(&#39;template_url&#39;); ?>/images/</code>。现在再刷新你的主页,看文章的缩略图是否可以正常显示。<code><?php bloginfo(&#39;template_url&#39;); ?></code>用于输出主题目录的URL。</p><h3 id="strong-添加pingback-strong"><strong>3、添加pingback</strong></h3><p>至于什么是pingback,你可以在搜索引擎中输入关键字:<code>WordPress pingback</code>,就可以得到你想要的答案了。如果你需要这个功能,可以在<code><head></code>里面添加以下代码:</p><div rel="PHP" class="code"><div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'><link rel="pingback" href="<?php bloginfo(&#39;pingback_url&#39;); ?>" /></pre><div class="contentsignin">Nach dem Login kopieren</div></div><div class="contentsignin">Nach dem Login kopieren</div></div></div><h3 id="strong-更改博客名称和描述-strong"><strong>4、更改博客名称和描述</strong></h3><p>在<code>header.php</code>,下面两行代码用于显示博客名称和描述:</p><div rel="HTML" class="code"><div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'><h1 id="logo" class="grid_4">Aurelius</h1> <h2 class="grid_12 caption clearfix">Our <span>blog</span>, keeping you up-to-date on our latest news.</h2></pre><div class="contentsignin">Nach dem Login kopieren</div></div><div class="contentsignin">Nach dem Login kopieren</div></div></div><p>上面是静态代码,现在做如下修改:</p><div rel="PHP" class="code"><div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'><h1 id="logo" class="grid_4"><a href="<?php echo get_option(&#39;home&#39;); ?>/"><?php bloginfo(&#39;name&#39;); ?></a></h1> <h2 class="grid_12 caption clearfix"><?php bloginfo(&#39;description&#39;); ?></h2></pre><div class="contentsignin">Nach dem Login kopieren</div></div><div class="contentsignin">Nach dem Login kopieren</div></div></div><p>现在你的博客首页看到的就是你博客名称和描述了,并且logo也是一个链接指向你的博客首页。我们这里说说这些php代码的作用。</p><ul><li><code><?php echo get_option(&#39;home&#39;); ?></code> 输出你的博客首页网址</li><li><code><?php bloginfo(&#39;name&#39;); ?></code> 输出你的博客名称</li><li><code><?php bloginfo(&#39;description&#39;); ?></code> 输出博客描述</li></ul><p>博客名称和描述可以在WordPress管理后台 - 设置 - 常规那里更改。以后制作你自己的WordPress主题的时候,你可参照上面的说明对你的主题进行修改。</p><h3 id="strong-添加订阅feed链接-strong"><strong>5、添加订阅feed链接</strong></h3><p>相信每个已发布的WordPress博客主题都会提供feed订阅,当然我们的主题也应该提供这样的功能。在<code></head></code>之前添加以下代码:</p><div rel="HTML" class="code"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'><link rel="alternate" type="application/rss+xml" title="RSS 2.0 - 所有文章" href="<?php echo get_bloginfo(&#39;rss2_url&#39;); ?>" /> <link rel="alternate" type="application/rss+xml" title="RSS 2.0 - 所有评论" href="<?php bloginfo(&#39;comments_rss2_url&#39;); ?>" /></pre><div class="contentsignin">Nach dem Login kopieren</div></div></div><h3 id="strong-添加wp-head-strong"><strong>6、添加wp_head</strong></h3><p>有些插件需要在网页头部执行一些类如添加一些js或css的动作,要让这些插件能够正常的工作,也让你的主题有更好的兼容性,你应该添加wp_head()函数。打开<code>header.php</code>,在<code></head></code>前面添加以下代码即可:</p><div rel="PHP" class="code"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'>&lt;?php wp_head(); ?&gt;</pre><div class="contentsignin">Nach dem Login kopieren</div></div></div><p>现在打开你的博客主页,查看源代码,<code></head></code>前面是不是多了以下类似代码(这些都是<code>wp_head()</code>的功劳):</p><div rel="HTML" class="code"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'><link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://ludou.co.tv/blog/xmlrpc.php?rsd" /> <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://ludou.co.tv/blog/wp-includes/wlwmanifest.xml" /> <link rel=&#39;index&#39; href=&#39;http://ludou.co.tv&#39; /> <meta name="generator" content="WordPress 2.9.2" /></pre><div class="contentsignin">Nach dem Login kopieren</div></div></div><h3 id="strong-添加Description-和-Keywords-strong"><strong>7、添加Description 和 Keywords</strong></h3><p>关于添加网页描述和关键字,可以查看我之前写过的文章:<a href="https://www.php.cn/cms/wordpress/501101.html" target="_blank" title="WordPress添加Description 和 Keywords" textvalue="WordPress使用经验(一)独立的Description 和 Keywords">WordPress使用经验(一)独立的Description 和 Keywords</a></p><h3 id="strong-显示菜单栏-strong"><strong>8、显示菜单栏</strong></h3><p>目前菜单栏有Home、Blog和Contact Us几个菜单,不过这些都是静态的内容,并不是你博客上的页面。现在我们将菜单栏换成你的菜单,这里只在菜单栏中列出页面page,当然你也可以再放置分类,根据你的喜好来吧,将header.php中:</p><div rel="HTML" class="code"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'><ul id="navigation" class="grid_8"> <li><a href="contact.html"><span class="meta">Get in touch</span><br /> Contact Us</a></li> <li><a href="blog.html" class="current"><span class="meta">Latest news</span><br /> Blog</a></li> <li><a href="index.html"><span class="meta">Homepage</span><br /> Home</a></li> </ul></pre><div class="contentsignin">Nach dem Login kopieren</div></div></div><p>改成:</p><div rel="PHP" class="code"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'><ul id="navigation" class="grid_8"> <?php wp_list_pages(&#39;depth=1&title_li=0&sort_column=menu_order&#39;); ?> <li <?php if (is_home()) { echo &#39;class="current"&#39;;} ?>><a title="<?php bloginfo(&#39;name&#39;); ?>" href="<?php echo get_option(&#39;home&#39;); ?>/">主页</a></li> </ul></pre><div class="contentsignin">Nach dem Login kopieren</div></div></div> <p>Die folgenden beiden Artikel stellen vor, wie man ein WordPress-Menü erstellt. Sie können sich auch darauf beziehen: </p> <ul style="list-style-type: disc;"> <li><p><a href="https://www.php.cn/cms/wordpress/501253.html" target="_blank">So erstellen Sie ein Theme-Navigationsmenü in WordPress (1)</a></p></li> <li> <p><a href="https://www.php.cn/cms/wordpress/501328.html" target="_blank">So erstellen Sie ein Theme-Navigationsmenü in WordPress (2)</a></p> </li> </ul> <h3 id="strong-Aktualisieren-Sie-den-Cache-strong"><strong>9. Aktualisieren Sie den Cache </strong></h3> <p> Fügen Sie PHP-Code vor <code><body></code> und nach <code></head></code> hinzu Verbessern Sie die Effizienz der Programmausführung: <?php flush(); ?><code><body></code>前面,<code></head></code>后面添加PHP代码,用于提高程序运行效率:<code><?php flush(); ?></code></p> <h3 id="strong-总结-strong"><strong>总结</strong></h3> <p>好了,本次练习到此结束!现在总结一些今天讲到的比较重要的知识点:</p> <ul> <li> <code>&lt;?php get_header(); ?&gt;</code> 从当前主题文件夹中包含header.php文件</li> <li> <code>is_home(),is_single(),is_category()</code>等几个条件判断标签</li> <li> <code><?php bloginfo(&#39;stylesheet_url&#39;); ?></code> 输出主题文件夹中style.css文件的路径</li> <li> <code><?php bloginfo(&#39;pingback_url&#39;); ?></code> 输出博客pingback网址</li> <li> <code><?php bloginfo(&#39;template_url&#39;); ?></code> 输出博客主题目录URL</li> <li> <code><?php echo get_option(&#39;home&#39;); ?></code>  输出你的博客首页网址</li> <li> <code><?php bloginfo(&#39;name&#39;); ?></code> 输出你的博客名称</li> <li> <code><?php bloginfo(&#39;description&#39;); ?></code> 输出博客描述</li> <li> <code>&lt;?php wp_head(); ?&gt;</code> 用于包含WordPress程序输出头部信息</li> <li> <code><?php wp_list_categories(); ?></code> 用于列出博客分类页</li> <li> <code><?php wp_list_pages(); ?></code> 用于列出博客页面</li> </ul> <p>到目前为止你的博客还只能看到主页,不要灰心,凡事一步一个脚印,以后教程会慢慢深入的。最后提供经过本次修改后的<code>Aurelius</code>主题文件,你可以用文本编辑器打开看看,跟你修改的文件比较比较(尤其是<code>header.php</code></p> <h3 id="Zusammenfassung">Zusammenfassung</h3> <p style="text-align: center;"><a rel="nofollow" href="https://xiazai.ludou.org/aurelius_header.zip" target="_blank"><img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/024/63f426bd9d92a141.jpg" class="lazy" alt="Der gesamte Prozess der WordPress-Theme-Erstellung (5): header.php erstellen" >Okay, diese Übung ist vorbei! Fassen Sie nun einige der heute erwähnten wichtigeren Wissenspunkte zusammen: </a></p> <ul> <code>&lt;?php get_header(); ?&gt;</code> Fügen Sie die Datei header.php aus dem aktuellen Theme-Ordner hinzu<p><a href="https://www.php.cn/cms/wordpress/" target="_blank">is_home(), is_single(), is_category() und mehrere andere bedingte Beurteilungs-Tags</a></p> <code><?php bloginfo('stylesheet_url'); ?></code> Ausgabe-Themenordner Der Pfad zur style.css-Datei in 🎜🎜<code><?php bloginfo('pingback_url'); ?></code> Geben Sie die Blog-Pingback-URL aus 🎜🎜<code><?php bloginfo('template_url') ; ?></code> Geben Sie die URL des Blog-Themenverzeichnisses aus🎜🎜<code><?php echo get_option('home'); ?></code> Geben Sie die URL Ihrer Blog-Homepage aus🎜🎜<code>< ?php bloginfo('name'); ?></code> Geben Sie Ihren Blog-Namen aus🎜🎜<code><?php bloginfo('description'); ?></code> Blog-Beschreibung ausgeben🎜🎜 >&lt;?php wp_head(); ?&gt; Wird verwendet, um die Ausgabe-Header-Informationen des WordPress-Programms einzuschließen. 🎜🎜<code><?php wp_list_categories(); ?></code> Wird verwendet, um die Kategorieseite von Blogs aufzulisten 🎜🎜<code><?php wp_list_pages(); ?></code> wird zum Auflisten von Blogseiten verwendet🎜🎜🎜Bisher kann Ihr Blog nur die Startseite sehen, lassen Sie sich nicht entmutigen, machen Sie alles in einem Schritt Zu einem Zeitpunkt Footprints werden die Tutorials in Zukunft schrittweise vertieft. Schließlich wird die Themendatei <code>Aurelius</code> nach dieser Änderung bereitgestellt. Sie können sie mit einem Texteditor öffnen und mit der von Ihnen geänderten Datei vergleichen (insbesondere <code>header.php</code>), siehe Wie hast du es geändert? 🎜🎜🎜🎜🎜🎜🎜Empfohlenes Lernen: „🎜WordPress-Tutorial🎜“🎜</ul><p>Das obige ist der detaillierte Inhalt vonDer gesamte Prozess der WordPress-Theme-Erstellung (5): header.php erstellen. Für weitere Informationen folgen Sie bitte anderen verwandten Artikeln auf der PHP chinesischen Website!</p> </div> </div> <div class="wzconShengming_sp"> <div class="bzsmdiv_sp">Erklärung dieser Website</div> <div>Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn</div> </div> </div> <ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-5902227090019525" data-ad-slot="2507867629"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <div class="AI_ToolDetails_main4sR"> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5902227090019525" data-ad-slot="3653428331" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <!-- <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hotarticle2.png" alt="" /> <h2>Heißer Artikel</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/1796780570.html" title="R.E.P.O. Energiekristalle erklärten und was sie tun (gelber Kristall)" class="phpgenera_Details_mainR4_bottom_title">R.E.P.O. Energiekristalle erklärten und was sie tun (gelber Kristall)</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 Wochen vor</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/1796780641.html" title="R.E.P.O. Beste grafische Einstellungen" class="phpgenera_Details_mainR4_bottom_title">R.E.P.O. Beste grafische Einstellungen</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 Wochen vor</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/1796785841.html" title="Assassin's Creed Shadows: Seashell Riddle -Lösung" class="phpgenera_Details_mainR4_bottom_title">Assassin's Creed Shadows: Seashell Riddle -Lösung</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>2 Wochen vor</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/1796780520.html" title="R.E.P.O. So reparieren Sie Audio, wenn Sie niemanden hören können" class="phpgenera_Details_mainR4_bottom_title">R.E.P.O. So reparieren Sie Audio, wenn Sie niemanden hören können</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 Wochen vor</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/1796779766.html" title="WWE 2K25: Wie man alles in Myrise freischaltet" class="phpgenera_Details_mainR4_bottom_title">WWE 2K25: Wie man alles in Myrise freischaltet</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 Monate vor</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/de/article.html">Mehr anzeigen</a> </div> </div> </div> --> <div class="phpgenera_Details_mainR3"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hottools2.png" alt="" /> <h2>Heiße KI -Werkzeuge</h2> </div> <div class="phpgenera_Details_mainR3_bottom"> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/de/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411540686492.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undresser.AI Undress" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/de/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_title"> <h3>Undresser.AI Undress</h3> </a> <p>KI-gestützte App zum Erstellen realistischer Aktfotos</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/de/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411552797167.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="AI Clothes Remover" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/de/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_title"> <h3>AI Clothes Remover</h3> </a> <p>Online-KI-Tool zum Entfernen von Kleidung aus Fotos.</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/de/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173410641626608.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undress AI Tool" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/de/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_title"> <h3>Undress AI Tool</h3> </a> <p>Ausziehbilder kostenlos</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/de/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411529149311.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Clothoff.io" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/de/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_title"> <h3>Clothoff.io</h3> </a> <p>KI-Kleiderentferner</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/de/ai/ai-hentai-generator" title="AI Hentai Generator" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173405034393877.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="AI Hentai Generator" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/de/ai/ai-hentai-generator" title="AI Hentai Generator" class="phpmain_tab2_mids_title"> <h3>AI Hentai Generator</h3> </a> <p>Erstellen Sie kostenlos Ai Hentai.</p> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/de/ai">Mehr anzeigen</a> </div> </div> </div> <script src="https://sw.php.cn/hezuo/cac1399ab368127f9b113b14eb3316d0.js" type="text/javascript"></script> <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hotarticle2.png" alt="" /> <h2>Heißer Artikel</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/1796780570.html" title="R.E.P.O. Energiekristalle erklärten und was sie tun (gelber Kristall)" class="phpgenera_Details_mainR4_bottom_title">R.E.P.O. Energiekristalle erklärten und was sie tun (gelber Kristall)</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 Wochen vor</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/1796780641.html" title="R.E.P.O. Beste grafische Einstellungen" class="phpgenera_Details_mainR4_bottom_title">R.E.P.O. Beste grafische Einstellungen</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 Wochen vor</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/1796785841.html" title="Assassin's Creed Shadows: Seashell Riddle -Lösung" class="phpgenera_Details_mainR4_bottom_title">Assassin's Creed Shadows: Seashell Riddle -Lösung</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>2 Wochen vor</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/1796780520.html" title="R.E.P.O. So reparieren Sie Audio, wenn Sie niemanden hören können" class="phpgenera_Details_mainR4_bottom_title">R.E.P.O. So reparieren Sie Audio, wenn Sie niemanden hören können</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 Wochen vor</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/1796779766.html" title="WWE 2K25: Wie man alles in Myrise freischaltet" class="phpgenera_Details_mainR4_bottom_title">WWE 2K25: Wie man alles in Myrise freischaltet</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 Monate vor</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/de/article.html">Mehr anzeigen</a> </div> </div> </div> <div class="phpgenera_Details_mainR3"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hottools2.png" alt="" /> <h2>Heiße Werkzeuge</h2> </div> <div class="phpgenera_Details_mainR3_bottom"> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/de/toolset/development-tools/92" title="Notepad++7.3.1" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab96f0f39f7357.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="Notepad++7.3.1" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/de/toolset/development-tools/92" title="Notepad++7.3.1" class="phpmain_tab2_mids_title"> <h3>Notepad++7.3.1</h3> </a> <p>Einfach zu bedienender und kostenloser Code-Editor</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/de/toolset/development-tools/93" title="SublimeText3 chinesische Version" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab97a3baad9677.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3 chinesische Version" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/de/toolset/development-tools/93" title="SublimeText3 chinesische Version" class="phpmain_tab2_mids_title"> <h3>SublimeText3 chinesische Version</h3> </a> <p>Chinesische Version, sehr einfach zu bedienen</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/de/toolset/development-tools/121" title="Senden Sie Studio 13.0.1" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab97ecd1ab2670.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="Senden Sie Studio 13.0.1" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/de/toolset/development-tools/121" title="Senden Sie Studio 13.0.1" class="phpmain_tab2_mids_title"> <h3>Senden Sie Studio 13.0.1</h3> </a> <p>Leistungsstarke integrierte PHP-Entwicklungsumgebung</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/de/toolset/development-tools/469" title="Dreamweaver CS6" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58d0e0fc74683535.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="Dreamweaver CS6" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/de/toolset/development-tools/469" title="Dreamweaver CS6" class="phpmain_tab2_mids_title"> <h3>Dreamweaver CS6</h3> </a> <p>Visuelle Webentwicklungstools</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/de/toolset/development-tools/500" title="SublimeText3 Mac-Version" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58d34035e2757995.png?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3 Mac-Version" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/de/toolset/development-tools/500" title="SublimeText3 Mac-Version" class="phpmain_tab2_mids_title"> <h3>SublimeText3 Mac-Version</h3> </a> <p>Codebearbeitungssoftware auf Gottesniveau (SublimeText3)</p> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/de/ai">Mehr anzeigen</a> </div> </div> </div> <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hotarticle2.png" alt="" /> <h2>Heiße Themen</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/gmailyxdlrkzn" title="Wo ist der Login-Zugang für Gmail-E-Mail?" class="phpgenera_Details_mainR4_bottom_title">Wo ist der Login-Zugang für Gmail-E-Mail?</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>7500</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>15</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/cakephp-tutor" title="CakePHP-Tutorial" class="phpgenera_Details_mainR4_bottom_title">CakePHP-Tutorial</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>1377</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>52</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/steamdzhmcssmgs" title="Wie lautet das Format des Kontonamens von Steam?" class="phpgenera_Details_mainR4_bottom_title">Wie lautet das Format des Kontonamens von Steam?</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>78</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>11</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/winactivationkeyper" title="Win11 -Aktivierungsschlüssel dauerhaft" class="phpgenera_Details_mainR4_bottom_title">Win11 -Aktivierungsschlüssel dauerhaft</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>52</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>19</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/newyorktimesdailybrief" title="NYT -Verbindungen Hinweise und Antworten" class="phpgenera_Details_mainR4_bottom_title">NYT -Verbindungen Hinweise und Antworten</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>19</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>54</span> </div> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/de/faq/zt">Mehr anzeigen</a> </div> </div> </div> </div> </div> <div class="Article_Details_main2"> <div class="phpgenera_Details_mainL4"> <div class="phpmain1_2_top"> <a href="javascript:void(0);" class="phpmain1_2_top_title">Related knowledge<img src="/static/imghw/index2_title2.png" alt="" /></a> </div> <div class="phpgenera_Details_mainL4_info"> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/de/faq/1796733273.html" title="PHP 8.4 Installations- und Upgrade-Anleitung für Ubuntu und Debian" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/000/000/080/676a727698393240.png?x-oss-process=image/resize,m_fill,h_207,w_330" alt="PHP 8.4 Installations- und Upgrade-Anleitung für Ubuntu und Debian" /> </a> <a href="https://www.php.cn/de/faq/1796733273.html" title="PHP 8.4 Installations- und Upgrade-Anleitung für Ubuntu und Debian" class="phphistorical_Version2_mids_title">PHP 8.4 Installations- und Upgrade-Anleitung für Ubuntu und Debian</a> <span class="Articlelist_txts_time">Dec 24, 2024 pm 04:42 PM</span> <p class="Articlelist_txts_p">PHP 8.4 bringt mehrere neue Funktionen, Sicherheitsverbesserungen und Leistungsverbesserungen mit einer beträchtlichen Menge an veralteten und entfernten Funktionen. In dieser Anleitung wird erklärt, wie Sie PHP 8.4 installieren oder auf PHP 8.4 auf Ubuntu, Debian oder deren Derivaten aktualisieren. Obwohl es möglich ist, PHP aus dem Quellcode zu kompilieren, ist die Installation aus einem APT-Repository wie unten erläutert oft schneller und sicherer, da diese Repositorys in Zukunft die neuesten Fehlerbehebungen und Sicherheitsupdates bereitstellen.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/de/faq/1796728164.html" title="So richten Sie Visual Studio-Code (VS-Code) für die PHP-Entwicklung ein" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/000/000/080/6764e39e44ffe544.png?x-oss-process=image/resize,m_fill,h_207,w_330" alt="So richten Sie Visual Studio-Code (VS-Code) für die PHP-Entwicklung ein" /> </a> <a href="https://www.php.cn/de/faq/1796728164.html" title="So richten Sie Visual Studio-Code (VS-Code) für die PHP-Entwicklung ein" class="phphistorical_Version2_mids_title">So richten Sie Visual Studio-Code (VS-Code) für die PHP-Entwicklung ein</a> <span class="Articlelist_txts_time">Dec 20, 2024 am 11:31 AM</span> <p class="Articlelist_txts_p">Visual Studio Code, auch bekannt als VS Code, ist ein kostenloser Quellcode-Editor – oder eine integrierte Entwicklungsumgebung (IDE) –, die für alle gängigen Betriebssysteme verfügbar ist. Mit einer großen Sammlung von Erweiterungen für viele Programmiersprachen kann VS Code c</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/de/faq/1796764479.html" title="Wie analysiert und verarbeitet man HTML/XML in PHP?" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/001/246/273/173890063284749.png?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Wie analysiert und verarbeitet man HTML/XML in PHP?" /> </a> <a href="https://www.php.cn/de/faq/1796764479.html" title="Wie analysiert und verarbeitet man HTML/XML in PHP?" class="phphistorical_Version2_mids_title">Wie analysiert und verarbeitet man HTML/XML in PHP?</a> <span class="Articlelist_txts_time">Feb 07, 2025 am 11:57 AM</span> <p class="Articlelist_txts_p">Dieses Tutorial zeigt, wie XML -Dokumente mit PHP effizient verarbeitet werden. XML (Extensible Markup-Sprache) ist eine vielseitige textbasierte Markup-Sprache, die sowohl für die Lesbarkeit des Menschen als auch für die Analyse von Maschinen entwickelt wurde. Es wird üblicherweise für die Datenspeicherung ein verwendet und wird häufig verwendet</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/de/faq/1796764490.html" title="PHP -Programm zum Zählen von Vokalen in einer Zeichenfolge" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/001/246/273/173890153318639.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="PHP -Programm zum Zählen von Vokalen in einer Zeichenfolge" /> </a> <a href="https://www.php.cn/de/faq/1796764490.html" title="PHP -Programm zum Zählen von Vokalen in einer Zeichenfolge" class="phphistorical_Version2_mids_title">PHP -Programm zum Zählen von Vokalen in einer Zeichenfolge</a> <span class="Articlelist_txts_time">Feb 07, 2025 pm 12:12 PM</span> <p class="Articlelist_txts_p">Eine Zeichenfolge ist eine Folge von Zeichen, einschließlich Buchstaben, Zahlen und Symbolen. In diesem Tutorial wird lernen, wie Sie die Anzahl der Vokale in einer bestimmten Zeichenfolge in PHP unter Verwendung verschiedener Methoden berechnen. Die Vokale auf Englisch sind a, e, i, o, u und sie können Großbuchstaben oder Kleinbuchstaben sein. Was ist ein Vokal? Vokale sind alphabetische Zeichen, die eine spezifische Aussprache darstellen. Es gibt fünf Vokale in Englisch, einschließlich Großbuchstaben und Kleinbuchstaben: a, e, ich, o, u Beispiel 1 Eingabe: String = "TutorialPoint" Ausgabe: 6 erklären Die Vokale in der String "TutorialPoint" sind u, o, i, a, o, ich. Insgesamt gibt es 6 Yuan</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/de/faq/1796790404.html" title="Erklären Sie JSON Web Tokens (JWT) und ihren Anwendungsfall in PHP -APIs." class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/001/253/068/174378264165720.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Erklären Sie JSON Web Tokens (JWT) und ihren Anwendungsfall in PHP -APIs." /> </a> <a href="https://www.php.cn/de/faq/1796790404.html" title="Erklären Sie JSON Web Tokens (JWT) und ihren Anwendungsfall in PHP -APIs." class="phphistorical_Version2_mids_title">Erklären Sie JSON Web Tokens (JWT) und ihren Anwendungsfall in PHP -APIs.</a> <span class="Articlelist_txts_time">Apr 05, 2025 am 12:04 AM</span> <p class="Articlelist_txts_p">JWT ist ein offener Standard, der auf JSON basiert und zur sicheren Übertragung von Informationen zwischen Parteien verwendet wird, hauptsächlich für die Identitätsauthentifizierung und den Informationsaustausch. 1. JWT besteht aus drei Teilen: Header, Nutzlast und Signatur. 2. Das Arbeitsprinzip von JWT enthält drei Schritte: Generierung von JWT, Überprüfung von JWT und Parsingnayload. 3. Bei Verwendung von JWT zur Authentifizierung in PHP kann JWT generiert und überprüft werden, und die Funktionen und Berechtigungsinformationen der Benutzer können in die erweiterte Verwendung aufgenommen werden. 4. Häufige Fehler sind Signaturüberprüfungsfehler, Token -Ablauf und übergroße Nutzlast. Zu Debugging -Fähigkeiten gehört die Verwendung von Debugging -Tools und Protokollierung. 5. Leistungsoptimierung und Best Practices umfassen die Verwendung geeigneter Signaturalgorithmen, das Einstellen von Gültigkeitsperioden angemessen.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/de/faq/1796683590.html" title="7 PHP-Funktionen, die ich leider vorher nicht kannte" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/000/000/001/6733fe271557f898.png?x-oss-process=image/resize,m_fill,h_207,w_330" alt="7 PHP-Funktionen, die ich leider vorher nicht kannte" /> </a> <a href="https://www.php.cn/de/faq/1796683590.html" title="7 PHP-Funktionen, die ich leider vorher nicht kannte" class="phphistorical_Version2_mids_title">7 PHP-Funktionen, die ich leider vorher nicht kannte</a> <span class="Articlelist_txts_time">Nov 13, 2024 am 09:42 AM</span> <p class="Articlelist_txts_p">Wenn Sie ein erfahrener PHP-Entwickler sind, haben Sie möglicherweise das Gefühl, dass Sie dort waren und dies bereits getan haben. Sie haben eine beträchtliche Anzahl von Anwendungen entwickelt, Millionen von Codezeilen debuggt und eine Reihe von Skripten optimiert, um op zu erreichen</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/de/faq/1796788902.html" title="Erklären Sie die späte statische Bindung in PHP (statisch: :)." class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/001/253/068/174360989012815.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Erklären Sie die späte statische Bindung in PHP (statisch: :)." /> </a> <a href="https://www.php.cn/de/faq/1796788902.html" title="Erklären Sie die späte statische Bindung in PHP (statisch: :)." class="phphistorical_Version2_mids_title">Erklären Sie die späte statische Bindung in PHP (statisch: :).</a> <span class="Articlelist_txts_time">Apr 03, 2025 am 12:04 AM</span> <p class="Articlelist_txts_p">Statische Bindung (statisch: :) implementiert die späte statische Bindung (LSB) in PHP, sodass das Aufrufen von Klassen in statischen Kontexten anstatt Klassen zu definieren. 1) Der Analyseprozess wird zur Laufzeit durchgeführt.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/de/faq/1796787532.html" title="Der Zugriff auf WordPress -Site -Datei ist eingeschränkt: Warum ist meine .txt -Datei nicht über den Domänennamen zugegriffen?" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/001/246/273/174277477812811.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Der Zugriff auf WordPress -Site -Datei ist eingeschränkt: Warum ist meine .txt -Datei nicht über den Domänennamen zugegriffen?" /> </a> <a href="https://www.php.cn/de/faq/1796787532.html" title="Der Zugriff auf WordPress -Site -Datei ist eingeschränkt: Warum ist meine .txt -Datei nicht über den Domänennamen zugegriffen?" class="phphistorical_Version2_mids_title">Der Zugriff auf WordPress -Site -Datei ist eingeschränkt: Warum ist meine .txt -Datei nicht über den Domänennamen zugegriffen?</a> <span class="Articlelist_txts_time">Apr 01, 2025 pm 03:00 PM</span> <p class="Articlelist_txts_p">Der Zugriff auf WordPress -Site -Datei ist eingeschränkt: Fehlerbehebung Der Grund, warum auf die TXT -Datei in letzter Zeit nicht zugegriffen werden kann. Einige Benutzer haben ein Problem beim Konfigurieren des MINI -Programms Business Domain Name: � ...</p> </div> </div> <a href="https://www.php.cn/de/cms/" class="phpgenera_Details_mainL4_botton"> <span>See all articles</span> <img src="/static/imghw/down_right.png" alt="" /> </a> </div> </div> </div> </main> <footer> <div class="footer"> <div class="footertop"> <img src="/static/imghw/logo.png" alt=""> <p>Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!</p> </div> <div class="footermid"> <a href="https://www.php.cn/de/about/us.html">Über uns</a> <a href="https://www.php.cn/de/about/disclaimer.html">Haftungsausschluss</a> <a href="https://www.php.cn/de/update/article_0_1.html">Sitemap</a> </div> <div class="footerbottom"> <p> © php.cn All rights reserved </p> </div> </div> </footer> <input type="hidden" id="verifycode" value="/captcha.html"> <script>layui.use(['element', 'carousel'], function () {var element = layui.element;$ = layui.jquery;var carousel = layui.carousel;carousel.render({elem: '#test1', width: '100%', height: '330px', arrow: 'always'});$.getScript('/static/js/jquery.lazyload.min.js', function () {$("img").lazyload({placeholder: "/static/images/load.jpg", effect: "fadeIn", threshold: 200, skip_invisible: false});});});</script> <script src="/static/js/common_new.js"></script> <script type="text/javascript" src="/static/js/jquery.cookie.js?1744637876"></script> <script src="https://vdse.bdstatic.com//search-video.v1.min.js"></script> <link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css?2' type='text/css' media='all' /> <script type='text/javascript' src='/static/js/viewer.min.js?1'></script> <script type='text/javascript' src='/static/js/jquery-viewer.min.js'></script> <script type="text/javascript" src="/static/js/global.min.js?5.5.53"></script> <script> var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function () { var u = "https://tongji.php.cn/"; _paq.push(['setTrackerUrl', u + 'matomo.php']); _paq.push(['setSiteId', '9']); var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; g.async = true; g.src = u + 'matomo.js'; s.parentNode.insertBefore(g, s); })(); </script> <script> // top layui.use(function () { var util = layui.util; util.fixbar({ on: { mouseenter: function (type) { layer.tips(type, this, { tips: 4, fixed: true, }); }, mouseleave: function (type) { layer.closeAll("tips"); }, }, }); }); document.addEventListener("DOMContentLoaded", (event) => { // 定义一个函数来处理滚动链接的点击事件 function setupScrollLink(scrollLinkId, targetElementId) { const scrollLink = document.getElementById(scrollLinkId); const targetElement = document.getElementById(targetElementId); if (scrollLink && targetElement) { scrollLink.addEventListener("click", (e) => { e.preventDefault(); // 阻止默认链接行为 targetElement.scrollIntoView({ behavior: "smooth" }); // 平滑滚动到目标元素 }); } else { console.warn( `Either scroll link with ID '${scrollLinkId}' or target element with ID '${targetElementId}' not found.` ); } } // 使用该函数设置多个滚动链接 setupScrollLink("Article_Details_main1L2s_1", "article_main_title1"); setupScrollLink("Article_Details_main1L2s_2", "article_main_title2"); setupScrollLink("Article_Details_main1L2s_3", "article_main_title3"); setupScrollLink("Article_Details_main1L2s_4", "article_main_title4"); setupScrollLink("Article_Details_main1L2s_5", "article_main_title5"); setupScrollLink("Article_Details_main1L2s_6", "article_main_title6"); // 可以继续添加更多的滚动链接设置 }); window.addEventListener("scroll", function () { var fixedElement = document.getElementById("Article_Details_main1Lmain"); var scrollTop = window.scrollY || document.documentElement.scrollTop; // 兼容不同浏览器 var clientHeight = window.innerHeight || document.documentElement.clientHeight; // 视口高度 var scrollHeight = document.documentElement.scrollHeight; // 页面总高度 // 计算距离底部的距离 var distanceToBottom = scrollHeight - scrollTop - clientHeight; // 当距离底部小于或等于300px时,取消固定定位 if (distanceToBottom <= 980) { fixedElement.classList.remove("Article_Details_main1Lmain"); fixedElement.classList.add("Article_Details_main1Lmain_relative"); } else { // 否则,保持固定定位 fixedElement.classList.remove("Article_Details_main1Lmain_relative"); fixedElement.classList.add("Article_Details_main1Lmain"); } }); </script> </body> </html>