ホームページ php教程 php手册 動的Webページ制作技術を学ぶ事例分析 PHP開発投票システム

動的Webページ制作技術を学ぶ事例分析 PHP開発投票システム

Jun 21, 2016 am 09:01 AM
cookie echo gt lt nbsp

如果你从来没有接触过PHP,那么还是先看看这个吧,当然即使是你已经对PHP有所了解,但一本PHP4的的使用手册也还是需要的,:)。此外一本HTML语法手册当然也是不可缺少的啦。

我们来开始做一个可以应用的PHP的投票程序。在这篇里大家将学习到cookie技术的使用,PHP的数组操作及档案的处理。如何?大家准备好了吗?Let"s go!

在开始具体的程序设计之前,我们先学习一下几个下面需要用到的重要概念和函数:

首先是cookie,我们需要用他来防止同一台机器进行重复投票。

那么什么是cookie?如果你的英文够好,又想吃块原味的cookie,那么先到这里来尝尝鲜;要不然你就只有吃地藏给你热的啦。。。。。(不好吃别扁我哟,:))

cookie原义在美语中是小甜饼的意思,当然我们现在不是要吃饼,在这cookie指的是一个有许多限制的ASCII文件。它是由服务器发给用户用于记录着用户在浏览过程中的一些信息。Cookies的文件大小被限制在4K以内。 cookie的用途是非常多的,比如你到过的一些网站有记录你来过次数,那就多半是用了cookie。 在这里我们用他来记录访问者是否已经投过票。

在PHP里我们可以非常方便的用setcookie函数来使用cookie,cookie实际上是HTTP协议中header的一部分。因此setcookie函数必须在没有任何其它信息输出到浏览器之前调用。说简单点就是要在标志前用这个函数啦……。下面是setcookie的用法示例,来自星空浪子大哥的PHP4中文手册,大家等下还可以再参照一下我们在程序中的具体用法。

setcookie

送出 Cookie 资讯到浏览器。

语法: int setcookie(string name, string value, int expire, string path, string domain, int secure);

传回值: 整数

函式种类: 网路系统

内容说明

本函式会跟着标头 Header 送出一段小资讯字串到浏览器。使用本函式要在送出 HTML 资料前,实际上 cookie 也算标头的一部份。本函式的参数除了第一个 name 之外,都是可以省略的。参数 name 表示 cookie 的名称;value 表示这个 cookie 的值,这个参数为空字串则表示取消浏览器中该 cookie 的资料;expire 表示该 cookie 的有效时间;path 为该 cookie 的相关路径;domain 表示 cookie 的网站;secure 则需在 https 的安全传输时才有效。

expire时间的格式如下:

Wdy, DD-Mon-YYYY HH:MM:SS GMT

GMT表示格林尼治标准时间

使用范例

$status = 0;
if (isset($myTstCky) && ($myTstCky == "ChocChip")) $status = 1;
if (!isset($CCHK)) {
setcookie("myTstCky", "ChocChip");
header("Location: $PHP_SELF?CCHK=1");
exit;
}
?>

Cookie Check

Cookie Check Status:

printf ("%s
;",   
$status ? "00FF00" : "FF0000",   
$status ? "PASSED!" : "FAILED!");   
?>

怎么样?大家对cookie的用法是不是有所了解呢?地藏在这里告诉大家一个关于expire日期的小技巧,如果你想让cookie的expire日期为从当前算起的第三天。那么你可以使用time()函数,这个函数将返回一个以秒为单位的当前时间(注意哟!这个时间是包括了年月日的,是不是很奇怪?:)),那么如果你想把expire日期定为第三天,那么就是 time()+60*60*24*3。

PHP的数组使用非常简单,大家只要注意它默认的起始下标是象C语言一样从零开始的,当然你也可以自己设定它的下标,如下面这样:

$descArray=array(
1=>"英文:源代码、程序下载",
2=>"英文:php动态",
3=>"英文:新闻组、公告栏",
4=>"英文:教学类",
5=>"中文:源代码、程序下载",
6=>"中文:新闻组、公告栏",
7=>"中文:教学类" );

使用的时候 $descArray[1]= "英文:源代码、程序下载"。更绝的是你还可以。

$MyArray2 = array( "
地支" => array("子", "丑", "寅", "卯"),
"生肖" => array("鼠", "牛", "虎", "兔"),
"数字" => array(1, 2, 3, 4) );

用的时候$MyArray2["地支"][0]="子"; 怎么样?是不是很有人情味啊,:)

最后我们来看看PHP的档案处理,PHP中用于档案处理的函数有大概几十个,在我们这一节里,使用了其中的五个函数fopen(); fclose(); flock();fexists();fwrite(); 其中我想重点说一下flock();其它的大家就去自己查手册吧。

为什么要重点说flock()?因为这是一个对于网络编程非常重要的功能,我举个例子,两个人同时投票,而且选的都是选项A,假设他们同时打开数据文件,这时A的选票是2,然后两个进程都在原有的基础上加1,接着一个写入了数据,另外一个也跟着写完了写入,大家想这时会出现什么情况?A的选票是多少?正确结果应该是4,但实际上却会是3。为什么会这样?这就是因为网络的多人环境的特点啦,所以我们在投票前一定要先用flock()函数把文件锁住,投完后再打开文件让其它的进程进行操作,这样才能防止出现上面的那类错误。下面是flock函数的用法说明。

flock 锁住档案。

语法: boolean flock(int fp, int operation);

传回值: 布林值

函式种类: 档案存取

内容说明 本函式用来锁住档案,使别的行程无法存取。传入的参数 fp 为档案的指标。参数 operation 的值为下列的数字之一:

1 、表示设定锁住档案可以允许别的行程读取;

2 、表示只有该行程可以写入档案;

3 、表示读写均锁住;

4 、不锁住区块 (block)。

而本函式无论在 UNIX 或是 Windows 系列中的锁住效果都相近。执行成功则传回 true 值,否则传回 false 值。

好了,基础的东西已经学完,让我们来进行实战吧!大家先下这个范例程序。然后可以在自己的平台上先试试看。相信这样会得到一点感性认识。

在这个应用中一共使用了三个文件vote.php,config.php,http://www.webjx.com/htmldata/2007-06-09/1.gif以及一个保存数据的文件(该文件的名字可以自由设定,在这里我们设为sum.txt),其中vote.php是主程序文件,config.php则用于设置一些经常需要修改的信息。

//config.php ファイル
//title 変数は、この HTML ファイルのタイトル タグを設定します。これは、ブラウザのタイトル バーに表示されるタイトルです。
$title=reader タイプアンケートフォーム;
//アンケートの内容を設定します。ここでは配列を使用しています。
$option= array("student", "worker", "peasant", "intellectual", "capitalist", "gangster"); >//アンケート結果を保存するファイルを
$countfile = "sum.txt";
//同じマシンが再度投票できる時間を設定
$limitdate = time()+ 60 *60*24*365;
?>
// vote.php ファイル
/*最初に、require と include の違いを簡単に説明します。 PHP プログラムの先頭では、PHP プログラムが実行される前に、まず require で指定されたファイルを読み込み、それを PHP プログラムの Web ページの一部にします。このようにして、よく使われる機能を Web ページに導入することもできます。 include は通常、プロセス制御の処理セクションに配置されます。 PHP プログラムの Web ページは、インクルード ファイルを読み取るときに、そのファイルを読み取ります。この方法により、プログラムの実行プロセスを簡略化できます。 */
require "config.php";?>
/*以下の部分が cookie であり、その有効期限は上記の config.php で設定されます。ここには 2 つの if 比較ステートメントがあることにすでに気づいているかもしれません。1 つ目は Cookie が設定されているかどうかを検出するもので、2 つ目は投票プロセスの前に他のユーザーが Cookie を送信するのを防ぐものです。 */
if (isset($vote) && $vote=="準備完了") $status = 1;
else $status=0; "true")
{
setcookie("vote","Ready",$limitdate)
}
?>

🎜><? echo $title ?> <br><meta http-equiv="Content-Type" content="text/html; charset=gb2312"> ></head> <br><body bgcolor="#FFFFFF"> <br>//元の投票結果を読み出し、変数 $result <br><br>if ( file_exists ( $countfile)){ <br> $result = file($countfile); <br>} <br>?> <br>/*以下は、switch を使用して 3 つの分岐を作成するメイン プログラムです。結果を確認します。 ケース 2. 選択内容を送信します。 ケース 3. フォームを生成します*/ <br><? 出てきます*/ <br/>case "結果を表示": <br/>echo "<table border="0 ">"; <br>for($i=0;$i<count></count>echo "</p> <tr>"."<td>".$option[$ i]."</td>"; <br/>エコー "<td>"."<img src="http://www.webjx.com/htmldata/2007-06-09/1.gif " width=""; <br/>echo "$result[$i]*10"; <br/>echo " " height="8"> </td>"; " 🎜>} <br/>echo " </table>"; <br>break; <br>/*選択結果をファイルに書き込みます。flock でファイルをロックすることに注意してください。この問題は投票プロセスでは特に顕著ではありません*/ <br>case "submit": <br>if ($status == 1){ <br>echo "あなたはすでに投票しています"; <br>} elseif( $sugest == 0){ <br>echo "選択の余地はありません"; <br>}else{ <br>if($fp=fopen($countfile,"w")){ <br>if (flock ($fp,3)){ <br>for ($i=0; $i< count ($option); $i++){ <br/>if ($sugest == $i+1){ <br/>$ result[$i]=$result[$i]+1; <br/>}else $result[$i]=$result[$i] + 0; <br/>echo $option[$i]." "。 $result[$i]."<br>"; <br/>fwrite($fp,$result[$i]."n"); <br/>} <br/>}else "投票に失敗しました"; >}else echo "投票失敗"; <br/>fclose($fp); <br/>/*投票フォームを表示*/ <br/>デフォルト: <br/>echo " <form action="vote.php" method="post" name="form1">"; <br>$sum = count($option); <br>for ($i=0; $i<$ sum; $ i++){ <br/>echo "<input type="radio" name="sugest" value="; <br/>echo $i+1; <br/>if ($i==0) echo " CHECKED"; <br/>echo ">".$option[$i]."<br/>} <br/>echo "<input type="hidden" name="ready" value="true">"; <br>echo "<br>"; <br/>echo "<input type="submit" name = "elect" value="送信">"; <br>echo "<input type="submit" name="elect" value="結果の表示">"; <br>echo "</form> "; <br>} <br>?> <br></p> <br></body> <br></html> <p>こんなシンプルなPHP投票アプリケーションが完成しましたこのプログラムは投票アプリケーションの最も重要な機能のいくつかを完了しているだけであり、まだ処理されていない詳細がいくつかあるため、単純であると言われています。例えば、ファイルの書き込みに失敗した場合の対処方法や、ユーザーがCookie機能をオフにした場合の対処方法などです。具体的な改善点は読者と友人に委ねられます。 </p> <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> </td> </tr> </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>3週間前</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>3週間前</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>7461</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>1376</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>44</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>17</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>17</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/616034.html" title="解決策: 組織では PIN を変更する必要があります。" 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/169641271514498.png?x-oss-process=image/resize,m_fill,h_207,w_330" alt="解決策: 組織では PIN を変更する必要があります。" /> </a> <a href="https://www.php.cn/ja/faq/616034.html" title="解決策: 組織では PIN を変更する必要があります。" class="phphistorical_Version2_mids_title">解決策: 組織では PIN を変更する必要があります。</a> <span class="Articlelist_txts_time">Oct 04, 2023 pm 05:45 PM</span> <p class="Articlelist_txts_p">ログイン画面に「組織から PIN の変更を求められています」というメッセージが表示されます。これは、個人のデバイスを制御できる組織ベースのアカウント設定を使用しているコンピューターで PIN の有効期限の制限に達した場合に発生します。ただし、個人アカウントを使用して Windows をセットアップした場合、エラー メッセージは表示されないのが理想的です。常にそうとは限りませんが。エラーが発生したほとんどのユーザーは、個人アカウントを使用して報告します。私の組織が Windows 11 で PIN を変更するように要求するのはなぜですか?アカウントが組織に関連付けられている可能性があるため、主なアプローチはこれを確認することです。ドメイン管理者に問い合わせると解決できます。さらに、ローカル ポリシー設定が間違っていたり、レジストリ キーが間違っていたりすると、エラーが発生する可能性があります。今すぐ</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ja/faq/612701.html" title="Windows 11 でウィンドウの境界線の設定を調整する方法: 色とサイズを変更する" 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/169535383039759.png?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Windows 11 でウィンドウの境界線の設定を調整する方法: 色とサイズを変更する" /> </a> <a href="https://www.php.cn/ja/faq/612701.html" title="Windows 11 でウィンドウの境界線の設定を調整する方法: 色とサイズを変更する" class="phphistorical_Version2_mids_title">Windows 11 でウィンドウの境界線の設定を調整する方法: 色とサイズを変更する</a> <span class="Articlelist_txts_time">Sep 22, 2023 am 11:37 AM</span> <p class="Articlelist_txts_p">Windows 11 では、新鮮でエレガントなデザインが前面に押し出されており、最新のインターフェイスにより、ウィンドウの境界線などの細部をカスタマイズして変更することができます。このガイドでは、Windows オペレーティング システムで自分のスタイルを反映した環境を作成するのに役立つ手順について説明します。ウィンドウの境界線の設定を変更するにはどうすればよいですか? + を押して設定アプリを開きます。 Windows [個人用設定] に移動し、[色の設定] をクリックします。ウィンドウの境界線の色の変更設定ウィンドウ 11" width="643" height="500" > [タイトル バーとウィンドウの境界線にアクセント カラーを表示する] オプションを見つけて、その横にあるスイッチを切り替えます。 [スタート] メニューとタスク バーにアクセント カラーを表示するにはスタート メニューとタスク バーにテーマの色を表示するには、[スタート メニューとタスク バーにテーマを表示] をオンにします。</p> </div> <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/633737.html" title="Windows 11で明るさを調整する10の方法" 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/170288051474678.png?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Windows 11で明るさを調整する10の方法" /> </a> <a href="https://www.php.cn/ja/faq/633737.html" title="Windows 11で明るさを調整する10の方法" class="phphistorical_Version2_mids_title">Windows 11で明るさを調整する10の方法</a> <span class="Articlelist_txts_time">Dec 18, 2023 pm 02:21 PM</span> <p class="Articlelist_txts_p">画面の明るさは、最新のコンピューティング デバイスを使用する上で不可欠な部分であり、特に長時間画面を見る場合には重要です。目の疲れを軽減し、可読性を向上させ、コンテンツを簡単かつ効率的に表示するのに役立ちます。ただし、設定によっては、特に新しい UI が変更された Windows 11 では、明るさの管理が難しい場合があります。明るさの調整に問題がある場合は、Windows 11 で明るさを管理するすべての方法を次に示します。 Windows 11で明るさを変更する方法【10の方法を解説】 シングルモニターユーザーは、次の方法でWindows 11の明るさを調整できます。これには、ラップトップだけでなく、単一のモニターを使用するデスクトップ システムも含まれます。はじめましょう。方法 1: アクション センターを使用する アクション センターにアクセスできる</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ja/faq/631532.html" title="iPhoneのSafariでプライベートブラウジング認証をオフにする方法は?" 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/170127130266328.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="iPhoneのSafariでプライベートブラウジング認証をオフにする方法は?" /> </a> <a href="https://www.php.cn/ja/faq/631532.html" title="iPhoneのSafariでプライベートブラウジング認証をオフにする方法は?" class="phphistorical_Version2_mids_title">iPhoneのSafariでプライベートブラウジング認証をオフにする方法は?</a> <span class="Articlelist_txts_time">Nov 29, 2023 pm 11:21 PM</span> <p class="Articlelist_txts_p">iOS 17 では、Apple はモバイル オペレーティング システムにいくつかの新しいプライバシーおよびセキュリティ機能を導入しました。その 1 つは、Safari のプライベート ブラウジング タブに対して 2 段階認証を要求する機能です。その仕組みとオフにする方法は次のとおりです。 iOS 17 または iPadOS 17 を実行している iPhone または iPad では、Safari でプライベート ブラウズ タブを開いていて、再度アクセスするためにセッションまたはアプリを終了する場合、Apple のブラウザでは Face ID/Touch ID 認証またはパスコードが必要になります。言い換えれば、ロックが解除されている iPhone または iPad を誰かが手に入れても、パスコードを知らなければプライバシーを閲覧することはできません。</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ja/faq/619412.html" title="Win10/11 デジタル アクティベーション スクリプト MAS バージョン 2.2 がデジタル アクティベーションを再サポート" 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/169741519896505.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Win10/11 デジタル アクティベーション スクリプト MAS バージョン 2.2 がデジタル アクティベーションを再サポート" /> </a> <a href="https://www.php.cn/ja/faq/619412.html" title="Win10/11 デジタル アクティベーション スクリプト MAS バージョン 2.2 がデジタル アクティベーションを再サポート" class="phphistorical_Version2_mids_title">Win10/11 デジタル アクティベーション スクリプト MAS バージョン 2.2 がデジタル アクティベーションを再サポート</a> <span class="Articlelist_txts_time">Oct 16, 2023 am 08:13 AM</span> <p class="Articlelist_txts_p">有名なアクティベーション スクリプト MAS2.2 バージョンでは、デジタル アクティベーションが再びサポートされています。このメソッドは @asdcorp とそのチームが考案したもので、MAS 作成者はそれを HWID2 と呼んでいます。 https://github.com/massgravel/Microsoft-Activation-Scripts から Gatherosstate.exe (オリジナルではなく、変更されたもの) をダウンロードし、パラメータを指定して実行し、AuthenticTicket.xml を生成します。まず元のメソッド: Gatherosstate.exePfn=xxxxxxx;DownlevelOriginalState=1 を確認し、次に最新のメソッド: Gatheros と比較します。</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ja/faq/634129.html" title="Cookie はどこに保存されますか?" 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/202312/20/2023122015072238281.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Cookie はどこに保存されますか?" /> </a> <a href="https://www.php.cn/ja/faq/634129.html" title="Cookie はどこに保存されますか?" class="phphistorical_Version2_mids_title">Cookie はどこに保存されますか?</a> <span class="Articlelist_txts_time">Dec 20, 2023 pm 03:07 PM</span> <p class="Articlelist_txts_p">Cookie は通常、ブラウザの Cookie フォルダに保存されます。ブラウザの Cookie ファイルは通常、バイナリ形式または SQLite 形式で保存されます。Cookie ファイルを直接開くと、文字化けしたり判読できないコンテンツが表示される可能性があるため、使用することをお勧めします。 Cookie を表示および管理するためにブラウザによって提供される Cookie 管理インターフェイス。</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ja/faq/634564.html" title="コンピューター上の Cookie はどこにありますか?" 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/202312/22/2023122215464172961.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="コンピューター上の Cookie はどこにありますか?" /> </a> <a href="https://www.php.cn/ja/faq/634564.html" title="コンピューター上の Cookie はどこにありますか?" class="phphistorical_Version2_mids_title">コンピューター上の Cookie はどこにありますか?</a> <span class="Articlelist_txts_time">Dec 22, 2023 pm 03:46 PM</span> <p class="Articlelist_txts_p">コンピュータ上の Cookie は、使用するブラウザとオペレーティング システムに応じて、ブラウザ上の特定の場所に保存されます。 1. Google Chrome、C:\Users\YourUsername\AppData\Local\Google\Chrome\User Data\Default \Cookies に保存されます。等</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?1744352820"></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>