ホームページ php教程 php手册 PHP を使用して RDF コンテンツを Web サイトに挿入する方法 (2)

PHP を使用して RDF コンテンツを Web サイトに挿入する方法 (2)

Jun 21, 2016 am 09:13 AM
gt lt quot

ウェブ|挿入|サイト

RSS は技術的にはよく構造化された XML ドキュメントであるため、標準の XML プログラミング技術を使用して処理できます。主要なテクノロジには、SAX (Simple API for XML) と DOM (Document Object Model) の 2 つがあります。

SAX パーサーは、XML ドキュメント全体を走査し、さまざまなタイプのタグに遭遇したときに特定の関数を呼び出すことによって機能します。たとえば、特定の関数を呼び出して開始タグを処理し、別の関数を呼び出して終了タグを処理し、その後、その間のデータを処理する関数を呼び出します。パーサーの役割は、単にドキュメントを順番に走査することです。呼び出される関数は、検出されたタグの処理を担当します。トークンが処理されると、アナライザーはドキュメント内の次の要素に進み、プロセスが繰り返されます。

一方、DOM パーサーの仕事は、XML ドキュメント全体をメモリに読み取り、それを階層ツリー構造に変換することです。また、さまざまなツリー ノード (およびノー​​ドにアタッチされたコンテンツ) にアクセスするための API も提供します。再帰的処理方法と API 関数により、開発者はさまざまなタイプのノード (要素、属性、文字データ、コメントなど) を区別できるようになり、同時にノードのタイプとノードの深さに基づいてさまざまなアクションを実行できるようになります。ドキュメントツリー。

SAX および DOM パーサーは、あなたと私のお気に入りである PHP を含む、ほぼすべての言語をサポートします。この記事では、PHP の SAX パーサーを使用して RDF を処理する例を紹介します。 もちろん、DOM パーサーを使用するのも同様に簡単です。

この簡単な例を見て、覚えておいてください。これは、http://www.freshmeat.net/ から直接取得した、使用する RDF ファイルです。 rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns :dc="http://purl.org/dc/elements/1.1/"
>
<チャンネル rdf:about="http://freshmeat.net/">
freshmeat .net< ;/title><br> <link>http://freshmeat.net/</link><br> <description>freshmeat.net は、Unix<br> およびクロスプラットフォームのオープン ソース ソフトウェアの Web 最大のインデックスを管理しています。 <br> freshmeat.net データベースに細心の注意を払ってカタログ化されており、新しい <br> コードへのリンクが毎日追加されます。</description><br> <dc: language>en-us</dc: language><br> <dc:subject> /dc:subject><br> <dc:publisher>freshmeat.net</dc:publisher><br> <dc:creator>freshmeat.net 寄稿者</dc:creator><br> <dc:rights>Copyright (c ) 1997 -2002 OSDN</dc:rights><br> <dc:date>2002-02-11T10:20+00:00</dc:date><br> <items><br> <rdf:Seq><br> < li rdf:resource="http://freshmeat.net/releases/69583/" /><br> <rdf:li rdf:resource="http://freshmeat.net/releases/69581/" /> ;<br/> <br/> <!-- など --><br> <br> </rdf:Seq><br> </items><br> <image rdf:resource="http://freshmeat.net/img/fmII -button .gif" /><br/> <textinput rdf:resource="http://freshmeat.net/search/" /><br/> </channel><br> <br> <image rdf:about="http://freshmeat.net/search/" /> .net/img/fmII-button.gif"><br> <title>freshmeat.net
http://freshmeat.net/img/fmII-button.gif http://freshmeat.net/

sloop.splitter 0.2.1
http://freshmeat.net/releases/69583/
リアルタイム効果音プログラム。< ;/説明>
2002-02-11T04:52-06:00



apacompile 1.9.9
http://freshmeat.net/releases/69581/
完全-注目の Apache コンパイル HOWTO。
2002-02-11T04:52-06:00




releases.rdf";

// パーサーで使用する変数をいくつか設定します
$currentTag = "";
$flag = "";

// パーサーを作成します
$xp = xml_parser_create();

// 要素ハンドラーを設定します
xml_set_element_handler($ xp, "elementBegin", "elementEnd");
xml_set_character_data_handler($xp, "characterData");
xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, TRUE);

// XML ファイルを読み取ります
if (!($fp = fopen( $file, "r")))
{
die("$file を読み取れませんでした");
}

// データを解析します
while ($xml = fread($fp, 4096))
{
if ( !xml_parse($xp, $xml, feof($fp)))
{
die("XML パーサー エラー: " .
xml_error_string(xml_get_error_code($xp)));
}
}

// パーサーを破棄します
xml_parser_free($xp);

// タグ ハンドラーを開始します
function elementBegin($parser, $name, $attributes)
{
global $currentTag, $flag;
// 現在のタグの名前をグローバル スコープにエクスポートします
$currentTag = $name;
// 項目ブロック内の場合、フラグを設定します
if ($name == "ITEM")
{
$flag = 1;
}
}

// 終了タグ ハンドラー
function elementEnd($parser, $name)
{
global $currentTag, $flag;
$currentTag = "";
// 項目ブロックを終了する場合、行を出力し、フラグをリセットします
if ($name == " ITEM")
{
echo "


";
$flag = 0;
}
}

// 文字データ ハンドラー
function CharacterData($parser, $data)
{
global $currentTag, $flag ;
// 項目ブロック内の場合、項目データを出力します
if (($currentTag == "TITLE" || $currentTag == "リンク" ||
$currentTag ==
"説明") && $flag == 1)
{
echo "$currentTag: $data
";
}
}

?> ;
不明な白を見ますか? -releases.rdf";

// パーサーで使用する変数をいくつか設定します
$currentTag = "";
$flag = "";

$currentTag变量保存は分析器の現在処理される要素の名前——私たちの最終的な目的は、チャンネル内の個々の項目(項目)を表示することであり、また、チェーンが付いていることを知る必要があるためです。さらに、私が使用しているのは SAX アナライザであり、逐次的に動作しており、API が提供できるアナライザはありません。したがって、私たちはこの問題を解決するための仕組みを自分で発明することができませんでした。これが、$flag 値がアナライザーに含まれているかどうかを判断するために使用されます。 区分けも 区分けの場所にあります。

次に行われるのは、SAX アナライザーの初期化と、RSS 文の分析の開始です。
// 要素ハンドラーを設定します
xml_set_element_handler($xp, "elementBegin", "elementEnd");
xml_set_character_data_handler($xp, "characterData");
xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, TRUE);

// XML ファイルを読み取ります
if (!($fp = fopen($file, "r")))
{
die("$file を読み取れませんでした");
}

// データを解析します
while ($xml = fread($ fp、4096))
{
if (!xml_parse($xp, $xml, feof($fp)))
{
die("XML パーサー エラー: " .
xml_error_string(xml_get_error_code($xp)));
}
}

// destroy parser
xml_parser_free($xp);


この段階のコードは明らかに、その中の注釈は十分に解読されています。给次に、xml_parse() 関数は、開始マークと停止マーク、およびその両方の間の文字データを処理します。

// 開始タグ ハンドラー
function elementBegin($parser, $name, $attributes)
{
global $currentTag, $ flag;
// 現在のタグの名前をグローバル スコープにエクスポートします
$currentTag = $name;
// 項目ブロック内の場合、フラグを設定します
if ($name == "ITEM")
{
$ flag = 1;
}
}



この関数は、現在認識されている名前とプロパティをパラメータとして使用します。名前は、全体の変数 $currentTag で評価されます。 g量置1。同様に、終了タグが見つかった場合は、終了タグ ハンドラー elementEnd() が呼び出されます。

// 終了タグハンドラー
function elementEnd($parser, $name)
{
global $currentTag, $flag;
$currentTag = "";
// 項目ブロックを終了する場合は、行を出力し、フラグをリセットします
if ($name == "ITEM")
{
echo "
";
$flag = 0;
}
}
クローズドタグ処理関数は、パラメータとしてタグ名も受け取ります。
の終了タグが見つかった場合、変数 $flag の値は 0 にリセットされ、変数 $currentTag の値はクリアされます。

それでは、タグ間の文字データはどのように扱うのでしょうか? これが私たちの興味です。まず、文字データ プロセッサであるcharacterData() に挨拶します。

// 文字データハンドラー
function CharacterData($parser, $data)
{
global $currentTag, $flag;
// 項目ブロック内の場合、項目データを出力します
if (($currentTag == "TITLE" || $currentTag == "リンク" ||
$currentTag ==
"説明") && $flag == 1)
{
echo "$currentTag: $data
";
}
}


ここで、この関数に渡されたパラメーターを見ると、アナライザーが現在どのタグを処理しているかは分からず、開始タグと終了タグの間のデータのみを受信することがわかります。これが、最初にグローバル変数 $currentTag を導入した理由です。

$flag 変数の値が 1 の場合、つまり、アナライザーが現在 ブロックの間にある場合、現在処理中の要素が 、< ;link> または <description> を使用すると、データが出力デバイス (この場合、出力デバイスは Web ブラウザー) に出力され、各要素の出力の後に改行文字 <br> が追加されます。 <br><br>RDF ドキュメント全体がこのように順次処理され、<item> タグが見つかるたびに特定の出力が表示されます。以下で実行結果をご覧ください: <br><br> </p> <center> </center> <p style="width:100%;text-align:center;margin:10px 0"> <br> <br> </p> <p style="width:100%;text-align:center;margin:10px 0"> </p> <p class="clear"></p> </div> </div> <div class="wzconShengming_sp"> <div class="bzsmdiv_sp">このウェブサイトの声明</div> <div>この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、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>人気の記事</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ja/faq/1796785841.html" title="アサシンのクリードシャドウズ:シーシェルリドルソリューション" class="phpgenera_Details_mainR4_bottom_title">アサシンのクリードシャドウズ:シーシェルリドルソリューション</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3週間前</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ja/faq/1796789525.html" title="Windows11 KB5054979の新しいものと更新の問題を修正する方法" class="phpgenera_Details_mainR4_bottom_title">Windows11 KB5054979の新しいものと更新の問題を修正する方法</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>2週間前</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ja/faq/1796785857.html" title="Atomfallのクレーンコントロールキーカードを見つける場所" class="phpgenera_Details_mainR4_bottom_title">Atomfallのクレーンコントロールキーカードを見つける場所</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3週間前</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ja/faq/1796781206.html" title="R.E.P.O.で節約説明した(そしてファイルを保存)" class="phpgenera_Details_mainR4_bottom_title">R.E.P.O.で節約説明した(そしてファイルを保存)</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 か月前</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ja/faq/1796783009.html" title="アサシンクリードシャドウ - 鍛冶屋を見つけて武器と鎧のカスタマイズを解除する方法" class="phpgenera_Details_mainR4_bottom_title">アサシンクリードシャドウ - 鍛冶屋を見つけて武器と鎧のカスタマイズを解除する方法</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4週間前</span> <span>By DDD</span> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ja/article.html">もっと見る</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>ホットAIツール</h2> </div> <div class="phpgenera_Details_mainR3_bottom"> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ja/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/ja/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_title"> <h3>Undresser.AI Undress</h3> </a> <p>リアルなヌード写真を作成する AI 搭載アプリ</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ja/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/ja/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_title"> <h3>AI Clothes Remover</h3> </a> <p>写真から衣服を削除するオンライン AI ツール。</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ja/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/ja/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_title"> <h3>Undress AI Tool</h3> </a> <p>脱衣画像を無料で</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ja/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/ja/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_title"> <h3>Clothoff.io</h3> </a> <p>AI衣類リムーバー</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ja/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/ja/ai/ai-hentai-generator" title="AI Hentai Generator" class="phpmain_tab2_mids_title"> <h3>AI Hentai Generator</h3> </a> <p>AIヘンタイを無料で生成します。</p> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ja/ai">もっと見る</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>人気の記事</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ja/faq/1796785841.html" title="アサシンのクリードシャドウズ:シーシェルリドルソリューション" class="phpgenera_Details_mainR4_bottom_title">アサシンのクリードシャドウズ:シーシェルリドルソリューション</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3週間前</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ja/faq/1796789525.html" title="Windows11 KB5054979の新しいものと更新の問題を修正する方法" class="phpgenera_Details_mainR4_bottom_title">Windows11 KB5054979の新しいものと更新の問題を修正する方法</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>2週間前</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ja/faq/1796785857.html" title="Atomfallのクレーンコントロールキーカードを見つける場所" class="phpgenera_Details_mainR4_bottom_title">Atomfallのクレーンコントロールキーカードを見つける場所</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3週間前</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ja/faq/1796781206.html" title="R.E.P.O.で節約説明した(そしてファイルを保存)" class="phpgenera_Details_mainR4_bottom_title">R.E.P.O.で節約説明した(そしてファイルを保存)</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 か月前</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ja/faq/1796783009.html" title="アサシンクリードシャドウ - 鍛冶屋を見つけて武器と鎧のカスタマイズを解除する方法" class="phpgenera_Details_mainR4_bottom_title">アサシンクリードシャドウ - 鍛冶屋を見つけて武器と鎧のカスタマイズを解除する方法</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4週間前</span> <span>By DDD</span> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ja/article.html">もっと見る</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>ホットツール</h2> </div> <div class="phpgenera_Details_mainR3_bottom"> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ja/toolset/development-tools/92" title="メモ帳++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="メモ帳++7.3.1" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ja/toolset/development-tools/92" title="メモ帳++7.3.1" class="phpmain_tab2_mids_title"> <h3>メモ帳++7.3.1</h3> </a> <p>使いやすく無料のコードエディター</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ja/toolset/development-tools/93" title="SublimeText3 中国語版" 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 中国語版" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ja/toolset/development-tools/93" title="SublimeText3 中国語版" class="phpmain_tab2_mids_title"> <h3>SublimeText3 中国語版</h3> </a> <p>中国語版、とても使いやすい</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ja/toolset/development-tools/121" title="ゼンドスタジオ 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="ゼンドスタジオ 13.0.1" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ja/toolset/development-tools/121" title="ゼンドスタジオ 13.0.1" class="phpmain_tab2_mids_title"> <h3>ゼンドスタジオ 13.0.1</h3> </a> <p>強力な PHP 統合開発環境</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ja/toolset/development-tools/469" title="ドリームウィーバー 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="ドリームウィーバー CS6" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ja/toolset/development-tools/469" title="ドリームウィーバー CS6" class="phpmain_tab2_mids_title"> <h3>ドリームウィーバー CS6</h3> </a> <p>ビジュアル Web 開発ツール</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ja/toolset/development-tools/500" title="SublimeText3 Mac版" 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版" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ja/toolset/development-tools/500" title="SublimeText3 Mac版" class="phpmain_tab2_mids_title"> <h3>SublimeText3 Mac版</h3> </a> <p>神レベルのコード編集ソフト(SublimeText3)</p> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ja/ai">もっと見る</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>ホットトピック</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ja/faq/gmailyxdlrkzn" title="Gmailメールのログイン入り口はどこですか?" class="phpgenera_Details_mainR4_bottom_title">Gmailメールのログイン入り口はどこですか?</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>7569</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/ja/faq/cakephp-tutor" title="CakePHP チュートリアル" class="phpgenera_Details_mainR4_bottom_title">CakePHP チュートリアル</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>1386</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/ja/faq/steamdzhmcssmgs" title="Steamのアカウント名の形式は何ですか" class="phpgenera_Details_mainR4_bottom_title">Steamのアカウント名の形式は何ですか</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>87</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/ja/faq/winactivationkeyper" title="Win11 Activation Key Permanent" class="phpgenera_Details_mainR4_bottom_title">Win11 Activation Key Permanent</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>61</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/ja/faq/newyorktimesdailybrief" title="NYTの接続はヒントと回答です" class="phpgenera_Details_mainR4_bottom_title">NYTの接続はヒントと回答です</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>28</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>107</span> </div> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ja/faq/zt">もっと見る</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/ja/faq/637582.html" title="Huawei GT3 ProとGT4の違いは何ですか?" 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/465/014/170383126488259.png?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Huawei GT3 ProとGT4の違いは何ですか?" /> </a> <a href="https://www.php.cn/ja/faq/637582.html" title="Huawei GT3 ProとGT4の違いは何ですか?" class="phphistorical_Version2_mids_title">Huawei GT3 ProとGT4の違いは何ですか?</a> <span class="Articlelist_txts_time">Dec 29, 2023 pm 02:27 PM</span> <p class="Articlelist_txts_p">多くのユーザーはスマートウォッチを選ぶときにファーウェイブランドを選択しますが、その中でもファーウェイ GT3pro と GT4 は非常に人気のある選択肢であり、多くのユーザーはファーウェイ GT3pro と GT4 の違いに興味を持っています。 Huawei GT3pro と GT4 の違いは何ですか? 1. 外観 GT4: 46mm と 41mm、材質はガラスミラー + ステンレススチールボディ + 高解像度ファイバーバックシェルです。 GT3pro: 46.6mm および 42.9mm、材質はサファイアガラス + チタンボディ/セラミックボディ + セラミックバックシェルです。 2. 健全な GT4: 最新の Huawei Truseen5.5+ アルゴリズムを使用すると、結果はより正確になります。 GT3pro: ECG 心電図と血管と安全性を追加</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ja/faq/595687.html" title="修正: Windows 11 で Snipping ツールが機能しない" 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/887/227/169284169836669.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="修正: Windows 11 で Snipping ツールが機能しない" /> </a> <a href="https://www.php.cn/ja/faq/595687.html" title="修正: Windows 11 で Snipping ツールが機能しない" class="phphistorical_Version2_mids_title">修正: Windows 11 で Snipping ツールが機能しない</a> <span class="Articlelist_txts_time">Aug 24, 2023 am 09:48 AM</span> <p class="Articlelist_txts_p">Windows 11 で Snipping Tool が機能しない理由 問題の根本原因を理解すると、適切な解決策を見つけるのに役立ちます。 Snipping Tool が正しく動作しない主な理由は次のとおりです。 フォーカス アシスタントがオンになっている: これにより、Snipping Tool が開かなくなります。破損したアプリケーション: 起動時にスニッピング ツールがクラッシュする場合は、破損している可能性があります。古いグラフィック ドライバー: 互換性のないドライバーは、スニッピング ツールに干渉する可能性があります。他のアプリケーションからの干渉: 実行中の他のアプリケーションが Snipping Tool と競合する可能性があります。証明書の有効期限が切れています: アップグレード プロセス中のエラーにより、この問題が発生する可能性があります。これらの簡単な解決策は、ほとんどのユーザーに適しており、特別な技術知識は必要ありません。 1. Windows および Microsoft Store アプリを更新する</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ja/faq/584743.html" title="iPhoneでApp Storeに接続できないエラーを修正する方法" 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/887/227/169059012999730.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="iPhoneでApp Storeに接続できないエラーを修正する方法" /> </a> <a href="https://www.php.cn/ja/faq/584743.html" title="iPhoneでApp Storeに接続できないエラーを修正する方法" class="phphistorical_Version2_mids_title">iPhoneでApp Storeに接続できないエラーを修正する方法</a> <span class="Articlelist_txts_time">Jul 29, 2023 am 08:22 AM</span> <p class="Articlelist_txts_p">パート 1: 最初のトラブルシューティング手順 Apple のシステムステータスを確認する: 複雑な解決策を掘り下げる前に、基本から始めましょう。問題はデバイスにあるのではなく、Apple のサーバーがダウンしている可能性があります。 Apple のシステム ステータス ページにアクセスして、AppStore が適切に動作しているかどうかを確認してください。問題があれば、Apple が修正してくれるのを待つしかありません。インターネット接続を確認します。「AppStore に接続できません」問題は接続不良が原因である場合があるため、安定したインターネット接続があることを確認してください。 Wi-Fi とモバイル データを切り替えるか、ネットワーク設定をリセットしてみてください ([一般] > [リセット] > [ネットワーク設定のリセット] > [設定])。 iOS バージョンを更新します。</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ja/faq/180076.html" title="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/202311/29/2023112910200043559.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决" /> </a> <a href="https://www.php.cn/ja/faq/180076.html" title="php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决" class="phphistorical_Version2_mids_title">php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决</a> <span class="Articlelist_txts_time">Jun 13, 2016 am 10:23 AM</span> <p class="Articlelist_txts_p">php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ja/faq/614415.html" title="watch4proとGTのどちらが優れていますか?" 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/202309/26/2023092614355911889.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="watch4proとGTのどちらが優れていますか?" /> </a> <a href="https://www.php.cn/ja/faq/614415.html" title="watch4proとGTのどちらが優れていますか?" class="phphistorical_Version2_mids_title">watch4proとGTのどちらが優れていますか?</a> <span class="Articlelist_txts_time">Sep 26, 2023 pm 02:45 PM</span> <p class="Articlelist_txts_p">Watch4proとgtはそれぞれ特徴や適用シーンが異なりますが、総合的な機能、高性能、スタイリッシュな外観を重視し、価格は高くてもいいという方にはWatch 4 Proの方が適しているかもしれません。高度な機能要件はなく、バッテリー寿命と手頃な価格を重視する場合は、GT シリーズの方が適しているかもしれません。最終的な選択は、個人のニーズ、予算、好みに基づいて決定する必要がありますが、購入する前に自分のニーズを慎重に検討し、さまざまな製品のレビューや比較を参照して、より情報に基づいた選択を行うことをお勧めします。</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ja/faq/717601.html" title="iPadOS 17.4 で iPad のバッテリー寿命を最適化する方法" 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/887/227/171103146330543.jpeg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="iPadOS 17.4 で iPad のバッテリー寿命を最適化する方法" /> </a> <a href="https://www.php.cn/ja/faq/717601.html" title="iPadOS 17.4 で iPad のバッテリー寿命を最適化する方法" class="phphistorical_Version2_mids_title">iPadOS 17.4 で iPad のバッテリー寿命を最適化する方法</a> <span class="Articlelist_txts_time">Mar 21, 2024 pm 10:31 PM</span> <p class="Articlelist_txts_p">iPadOS 17.4 で iPad のバッテリー寿命を最適化する方法 バッテリー寿命の延長はモバイル デバイス エクスペリエンスの鍵であり、iPad がその良い例です。 iPad のバッテリーの消耗が早すぎると感じても、心配しないでください。iPadOS 17.4 には、デバイスの実行時間を大幅に延長できるトリックや微調整が多数あります。この詳細なガイドの目的は、情報を提供するだけではなく、iPad の使用方法を変え、全体的なバッテリー管理を強化し、充電せずにデバイスをより長く使用できるようにすることです。ここで概説したプラクティスを採用することで、個人のニーズや使用パターンに合わせてテクノロジーをより効率的かつ意識的に使用するための一歩を踏み出すことができます。主要なエネルギー消費者を特定する</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ja/faq/615463.html" title="Microsoft は、Copilot を使用して Windows 11 23H2 ビルドをリリース プレビュー チャネルに展開しています" 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/465/014/169589983596224.png?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Microsoft は、Copilot を使用して Windows 11 23H2 ビルドをリリース プレビュー チャネルに展開しています" /> </a> <a href="https://www.php.cn/ja/faq/615463.html" title="Microsoft は、Copilot を使用して Windows 11 23H2 ビルドをリリース プレビュー チャネルに展開しています" class="phphistorical_Version2_mids_title">Microsoft は、Copilot を使用して Windows 11 23H2 ビルドをリリース プレビュー チャネルに展開しています</a> <span class="Articlelist_txts_time">Sep 28, 2023 pm 07:17 PM</span> <p class="Articlelist_txts_p">誰もが今日の Windows 1123H2 リリースを楽しみにしています。実際、Microsoft は、正式リリース段階に最も近いチャネルであるリリース プレビューのアップデートを開始したところです。ビルド 22631 として知られる Microsoft によると、ブランドを変更した新しいチャット アプリ、Phone Links、および Play Together ウィジェットを展開しており、これらは過去数か月間他の社内チャネルでテストされてきました。 「この新しい更新プログラムは、Windows 11 バージョン 22H2 と同じサービス ブランチとコード ベースを持ち、Windows の Copilot (プレビュー) を含む、新しく発表されたすべての機能と累積的になります」と Microsoft は約束しています。レドモンド関係者はさらに</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ja/faq/180466.html" title="请教怎么修改url某一参数的参数值呢?是要拆开了再拼回去吗" 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/202311/24/2023112417345045903.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="请教怎么修改url某一参数的参数值呢?是要拆开了再拼回去吗" /> </a> <a href="https://www.php.cn/ja/faq/180466.html" title="请教怎么修改url某一参数的参数值呢?是要拆开了再拼回去吗" class="phphistorical_Version2_mids_title">请教怎么修改url某一参数的参数值呢?是要拆开了再拼回去吗</a> <span class="Articlelist_txts_time">Jun 13, 2016 am 10:24 AM</span> <p class="Articlelist_txts_p">请问如何修改url某一参数的参数值呢?是要拆开了再拼回去吗?那么请问如何修改url某一参数的参数值呢?是要拆开了再拼回去吗?http://127.0.0.1/myo/newuser.php?mod=search&type=fastone比如现在我要修改mod=new要怎么做呢?------解决方案--------------------发送了请求</p> </div> </div> <a href="https://www.php.cn/ja/php-tutorials.html" 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>福祉オンライン PHP トレーニング,PHP 学習者の迅速な成長を支援します!</p> </div> <div class="footermid"> <a href="https://www.php.cn/ja/about/us.html">私たちについて</a> <a href="https://www.php.cn/ja/about/disclaimer.html">免責事項</a> <a href="https://www.php.cn/ja/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?1745036806"></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>