ホームページ php教程 php手册 シンプルなPHPエントリーソースプログラム

シンプルなPHPエントリーソースプログラム

Jun 21, 2016 am 09:07 AM
gt lt php quot

プログラム

「星空の放蕩者」PHP 中国語ドキュメントの例を引用:



チャット ルームは、Web サイト上の退屈な人々のための秘密兵器です。同時に、ウェブマスターやその他の担当者もここで時間を潰すことができます。オンラインで活発な恋愛をしている場合でも、少なくともタイピング速度を上げることはできます。

チャット ルームは、実際には複数の人が使用する CGI プログラムです。プログラムは、各人が入力した文字列を、システムが受信した時刻に従って並べ替えて、各ユーザーに送信します。 Web チャット ルームと BBS チャット ルームの違いは、BBS チャット ルームは受信したすべての文をチャット ルーム内のすべてのインターネット ユーザーに即座に配信できることです。Web CGI プログラムは BBS Telnet 回線のように常に接続できるわけではなく、Web CGI は情報を迅速に送信する必要があります。可能な限り選択してから接続を終了します。この状況は、Web チャット ルームが依然として HTTP 送信プロトコルを使用しているため、HTTP 実装のバージョンが、バージョン 0.9、1.0、または 1.1 のいずれであっても、ネットワーク接続ポートを長時間占有することができないために発生します。



データをすぐに転送できない問題と情報の更新の問題を解決するために、Netscape はブラウザのバージョン 3.0 以降の新しい技術を採用し、Internet Explorer も Netscape が開発したこれらの技術を実装しました。 Netscape では、これをサーバー プッシュとクライアント プルの 2 つのテクノロジーに分割しています。サーバー プッシュでは、Web サーバーからの複数の MIME エンコーディングを使用してユーザーにデータを送信しますが、クライアント プルでは HTML メタ タグと http-equiv="Refresh" 属性を使用します。読み込み時間に関しては、content 属性を使用して実現されます。



タグは通常、ブラウザがユーザー側 Web ページを更新できるように .. のセクションに配置されます。以下は、15 秒ごとにリロードするように設定されたメタと PHP の例です。



サーバープッシュまたはクライアントプルを使用しない場合チャット ルームを作成します。Web ブラウザでチャットできるようにする他の方法はありますか?答えは「はい」です。 Java または ActiveX (IE4 および 5 に限定) を使用したり、独自の専用ブラウザ プラグイン プログラム (Qimo のチャット ルームなど) を開発したりすることもできますが、これは PHP とは関係がなく、私たちの焦点でもありません。



また、すべてのネチズンのメッセージは定期的に更新されるため、更新によって書きかけの文字列が消去されることを避けるために、チャットルームを構築するためにフレームテクノロジーを使用する必要があります。以下の例はチャット ルームのメイン プログラムです。









;



; <br><br>このチャット ルームではページ フレームを使用する必要があります。お使いのブラウザは使用できません<br><br></frameset> <br><br><br><br><br><br>このプログラムはフレームを使用して 2 つの PHP プログラムを呼び出します。将来のメンテナンスのために、それらを /chatroom などの同じディレクトリに置くことをお勧めします。さらに、list.php と post.php で同じ変数を使用するために、次の例では、共通の変数パスを env.inc に配置します。これは、/chatroom または Web サーバーの PHP インクルードに配置できます。 Apache) を設定したパスに追加します。 <br><br><br><br><br><?php <br/><br/>// ファイル名: env.inc <br/><br/>$tempdir="/tmp/"; <br/><br/>$chatfile="/tmp/abc"; <br/><br/><br/><br/> チャット ルームのバックエンドは、ファイルを使用するだけで簡単に設計できます。システムの効率を本当に重視する場合は、データベースを作成してそこにチャット コンテンツを投入することもできます。 UNIX を使用したトリップ通信 IPC。 <br/><br/><br/><br/>このセクションでは、ユーザー コメントの内容をファイルに入れる方法について説明します。ここでの例のほとんどは、UNIX/Linux 外部コマンドを使用します。システムにこのコマンド (またはプログラム) がない場合は、関連するプログラムをご自身でインストールしてください。 <br/><br/><br/><br/>実際、データをファイルにスローする方が、データベースを使用するよりも高速です。それでも速度を重視する場合は、UNIX マシンに RAM ディスクをインストールし、その RAM ディスクへのファイル アクセス パスを設定することができます。アクセス速度は厳しい要件を満たすことができます。高速検索エンジンとして宣伝している Web サイトの中には、データベース情報全体を RAM ディスクに保存しているものもあります。これにより、システム速度がすぐに 10 倍から 100 倍向上します。さらに、RAM の価格は他のソリューションに比べて比較的安価です。 Windows NT を使用している場合は、Microsoft が提供するのを待つか、サードパーティ製品を使用するしかありません。 <br/><br/><br/><br/>UNIX にあまり詳しくないユーザーもいるかもしれないので、使用するコマンドを簡単に紹介します: <br/><br/><br/><br/>touch: 新しいファイルを作成するか、古いファイルの最終更新日を変更します。 <br/><br/><br/><br/>echo プラス 2 つの大なり記号: 文字列表示を指定された場所にリダイレクトします。 <br/><br/><br/><br/>tail: ファイル内のデータの最後の数行を表示します。デフォルト値は 10 行で、マイナス記号と数値を使用して表示する行数を変更できます。 <br/><br/><br/><br/>以下は、env.inc ファイルを使用してメッセージ文字列を送信および処理するプログラムです。 <br/><br/><br/><br/><br/><br/><?php <br/><br/>// ファイル名: post.php <br/><br/>require("env.inc"); <br/><br/>if (($chatuser!="") and ($chattext!=" ")) { <br/><br/> $chatstr="<font color=8080ff>".date("h:i:s")."</font>-<font color=ff8080>".$chatuser." </font>: ".$chattext; <br><br> $cmdstr="echo "".$chatstr."" >> ".$chatfile; <br><br> if (!file_exists($chatfile)) passthru("touch ".$chatfile); <br><br> passthru($cmdstr); <br><br>} <br><br>?><html> <br><br><body bgcolor=ffffff leftmargin=0 topmargin=0 marginheight=0 marginwidth=0> <br><br>< ;form action=<? echo $PHP_SELF; > <br><br><width=100%><tr> 匿名:< td> <br><br><td><input type=text name=chatuser size=8 value="<? echo $chatuser; ?>"></td> <br><br><td align=right>話す:</td> <br><br><td><input type=text name=chattext size=30 maxlength=500></td> <br><br><td><div align=right< type=submit value="送信"></td> <br><br></form> <br><br></html> <br><br><br><br>プログラムはまず入力文字列があるかどうかを確認し、匿名や発言内容の文字列が無い場合は発言の形式(Form)を表示し、データがある場合にはその文字列と現在時刻を格納します。ファイル (UNIX ステアリング命令を使用)。もちろん、エラーを防ぐために、まずアーカイブできるファイルがあるかどうかを確認してください。ない場合は、最初にファイルをタッチします。この例では、ファイルは /tmp/abc です。 <br><br><br><br><br><html> <br><br><meta http-equiv="Refresh" content="5; url=<? echo $PHP_SELF; ?>"> text/html; charset=gb2312" http-equiv=Content-Type> <br><br><body bgcolor=ffffff leftmargin=0 topmargin=0 marginheight=0 marginwidth=0> <br><br><? <br/><br/>// ファイル名: list .php <br/><br/>require("env.inc"); <br/><br/><br/><br/>if (!file_exists($chatfile)) { <br/><br/> echo "まだ開かれていません</body></html>"; <br>} <br><br><br>$uniqfile=$tempdir.uniqid(rand()); <br><br>$shellcmd="/usr/bin/tail -50 ".$chatfile. " > ".$uniqfile; $shellcmd); <br><br>$chatfilearray=file($uniqfile); <br><br>for ($i<br> echo $ Chatfilearray [$ j-$ i]; <br><br>} <br><br> & gt; /body & gt; 5秒ごとに更新されます。同様に、共有の env.inc ファイルも必要であり、その中の変数を変更する場合は、すべての Web プログラムで使用できる非常に重要な方法です。場所。たとえば、新しい年に「Copyright (C) 1996-2000」という文字列がファイルに配置されると、1 つのファイルが変更されるだけでサイト全体が変更されます。 <br><br><br><br>if (!file_exists($chatfile)) { <br><br> echo "まだ開かれていません</body></html> <br><br> exit; <br><br><br><br>$uniqfile=$tempdir.uniqid (rand()); <br><br>$shellcmd="/usr/bin/tail -50 ".$chatfile. " > ".$uniqfile; <br><br><br><br>ユーザーがチャット コンテンツを送信するファイル /tmp/abc が存在します。ファイルが存在しない場合は、未オープンとして表示され、ユーザーがチャット コンテンツを送信するのを待ちます。すでにチャット データがある場合は、最後の 50 件を取得し、別のファイルに表示する準備をします。 <br><br><br>$chatfilearray=file($uniqfile); <br><br>$j=count($chatfilearray); <br><br>for ($i=1; $i<=$j; $i++) { <br><br> echo $chatfilearray[ $j-$i]."<br>n" <br><br>} <br><br>リンク解除($uniqfile);ファイルを配列変数 $chatfilearray に読み込み、最後のデータを最初に表示してブラウザに送信します。もちろん、配列を並べ替える方法を使用することもできますが、最後に格納されたデータが最後にあることを確認してください。これは本当に CPU 時間の無駄なので、データは最後から先頭にエコーされます。使用後は、unlink() コマンドを使用して一時ファイルを強制終了する必要もあります。 </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/1796780570.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>3週間前</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ja/faq/1796780641.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>3週間前</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <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>2週間前</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ja/faq/1796780520.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>3週間前</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ja/faq/1796779766.html" title="WWE 2K25:Myriseのすべてのロックを解除する方法" class="phpgenera_Details_mainR4_bottom_title">WWE 2K25:Myriseのすべてのロックを解除する方法</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4週間前</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</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/1796780570.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>3週間前</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ja/faq/1796780641.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>3週間前</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <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>2週間前</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ja/faq/1796780520.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>3週間前</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ja/faq/1796779766.html" title="WWE 2K25:Myriseのすべてのロックを解除する方法" class="phpgenera_Details_mainR4_bottom_title">WWE 2K25:Myriseのすべてのロックを解除する方法</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4週間前</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</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>7470</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>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/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>77</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>48</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>19</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>29</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/1796733273.html" title="Ubuntu および Debian 用の PHP 8.4 インストールおよびアップグレード ガイド" 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="Ubuntu および Debian 用の PHP 8.4 インストールおよびアップグレード ガイド" /> </a> <a href="https://www.php.cn/ja/faq/1796733273.html" title="Ubuntu および Debian 用の PHP 8.4 インストールおよびアップグレード ガイド" class="phphistorical_Version2_mids_title">Ubuntu および Debian 用の PHP 8.4 インストールおよびアップグレード ガイド</a> <span class="Articlelist_txts_time">Dec 24, 2024 pm 04:42 PM</span> <p class="Articlelist_txts_p">PHP 8.4 では、いくつかの新機能、セキュリティの改善、パフォーマンスの改善が行われ、かなりの量の機能の非推奨と削除が行われています。 このガイドでは、Ubuntu、Debian、またはその派生版に PHP 8.4 をインストールする方法、または PHP 8.4 にアップグレードする方法について説明します。</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ja/faq/1796604998.html" title="CakePHP の日付と時刻" 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/172596042710877.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="CakePHP の日付と時刻" /> </a> <a href="https://www.php.cn/ja/faq/1796604998.html" title="CakePHP の日付と時刻" class="phphistorical_Version2_mids_title">CakePHP の日付と時刻</a> <span class="Articlelist_txts_time">Sep 10, 2024 pm 05:27 PM</span> <p class="Articlelist_txts_p">Cakephp4 で日付と時刻を操作するには、利用可能な FrozenTime クラスを利用します。</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ja/faq/1796605002.html" title="CakePHP について話し合う" 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/202409/10/2024091017281739989.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="CakePHP について話し合う" /> </a> <a href="https://www.php.cn/ja/faq/1796605002.html" title="CakePHP について話し合う" class="phphistorical_Version2_mids_title">CakePHP について話し合う</a> <span class="Articlelist_txts_time">Sep 10, 2024 pm 05:28 PM</span> <p class="Articlelist_txts_p">CakePHP は、PHP 用のオープンソース フレームワークです。これは、アプリケーションの開発、展開、保守をより簡単にすることを目的としています。 CakePHP は、強力かつ理解しやすい MVC のようなアーキテクチャに基づいています。モデル、ビュー、コントローラー</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ja/faq/1796604999.html" title="CakePHP ファイルのアップロード" 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/164/172596043255110.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="CakePHP ファイルのアップロード" /> </a> <a href="https://www.php.cn/ja/faq/1796604999.html" title="CakePHP ファイルのアップロード" class="phphistorical_Version2_mids_title">CakePHP ファイルのアップロード</a> <span class="Articlelist_txts_time">Sep 10, 2024 pm 05:27 PM</span> <p class="Articlelist_txts_p">ファイルのアップロードを行うには、フォーム ヘルパーを使用します。ここではファイルアップロードの例を示します。</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ja/faq/1796604997.html" title="CakePHP バリデータの作成" 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/164/172596041825531.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="CakePHP バリデータの作成" /> </a> <a href="https://www.php.cn/ja/faq/1796604997.html" title="CakePHP バリデータの作成" class="phphistorical_Version2_mids_title">CakePHP バリデータの作成</a> <span class="Articlelist_txts_time">Sep 10, 2024 pm 05:26 PM</span> <p class="Articlelist_txts_p">Validator は、コントローラーに次の 2 行を追加することで作成できます。</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ja/faq/1796604990.html" title="CakePHP のロギング" 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/172596037751490.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="CakePHP のロギング" /> </a> <a href="https://www.php.cn/ja/faq/1796604990.html" title="CakePHP のロギング" class="phphistorical_Version2_mids_title">CakePHP のロギング</a> <span class="Articlelist_txts_time">Sep 10, 2024 pm 05:26 PM</span> <p class="Articlelist_txts_p">CakePHP へのログインは非常に簡単な作業です。使用する関数は 1 つだけです。 cronjob などのバックグラウンド プロセスのエラー、例外、ユーザー アクティビティ、ユーザーが実行したアクションをログに記録できます。 CakePHP でのデータのログ記録は簡単です。 log()関数が提供されています</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ja/faq/1796728164.html" title="PHP 開発用に Visual Studio Code (VS Code) をセットアップする方法" 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="PHP 開発用に Visual Studio Code (VS Code) をセットアップする方法" /> </a> <a href="https://www.php.cn/ja/faq/1796728164.html" title="PHP 開発用に Visual Studio Code (VS Code) をセットアップする方法" class="phphistorical_Version2_mids_title">PHP 開発用に Visual Studio Code (VS Code) をセットアップする方法</a> <span class="Articlelist_txts_time">Dec 20, 2024 am 11:31 AM</span> <p class="Articlelist_txts_p">Visual Studio Code (VS Code とも呼ばれる) は、すべての主要なオペレーティング システムで利用できる無料のソース コード エディター (統合開発環境 (IDE)) です。 多くのプログラミング言語の拡張機能の大規模なコレクションを備えた VS Code は、</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ja/faq/1796605003.html" title="CakePHP クイックガイド" 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/172596043773435.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="CakePHP クイックガイド" /> </a> <a href="https://www.php.cn/ja/faq/1796605003.html" title="CakePHP クイックガイド" class="phphistorical_Version2_mids_title">CakePHP クイックガイド</a> <span class="Articlelist_txts_time">Sep 10, 2024 pm 05:27 PM</span> <p class="Articlelist_txts_p">CakePHP はオープンソースの MVC フレームワークです。これにより、アプリケーションの開発、展開、保守がはるかに簡単になります。 CakePHP には、最も一般的なタスクの過負荷を軽減するためのライブラリが多数あります。</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?1744449951"></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>