| 订阅 | 在线投稿
分享
 
 
当前位置: 王朝网络 >> php >> chu xue zhe xue xi PHP kai fa ying gai zhang wo de ji duan jing hua dai ma

chu xue zhe xue xi PHP kai fa ying gai zhang wo de ji duan jing hua dai ma

2008-12-28 07:39:25 编辑來源:互联网 评论
 
 
 
本文为【初学者学习PHP开发应该掌握的几段精华代码】的拼音翻译版
  jing dian xun huan li zi
  <HTML>
  <HEAD>
  <TITLE> jing dian xun huan li zi </TITLE>
  </HEAD>
  <BODY>
  <?
   for($counter = 1; $counter <= 6; $counter++) // xun huan 6 ci
   {
   print("<B>counter is $counter</B><BR>\n"); // da yin 6 ci
   }
  ?>
  </BODY>
  </HTML>
  for de gao ji yun yong
  <HTML>
  <HEAD>
  <TITLE>for de gao ji yun yong </TITLE>
  </HEAD>
  <BODY>
  <?
   /*
   ** da yin bi yao de shuo ming wen zi
   */
   print("<B> ju li xing qi yi huan you ji tian ?</B>\n");
   print("<OL>\n");
   for($currentDate = date("U"); // ding yi $currentDate shi jian ge shi
   date("l", $currentDate) != "Monday"; // pan duan shi bu shi dang qian xi tong shi jian shi Monday
   $currentDate += (60 * 60 * 24)) // dang qian shi jian jia shang 1 tian
   {
   /*
   ** da yin shi jian ming cheng
   */
   print("<LI>" . date("l", $currentDate) . "\n");
   }
   print("</OL>\n");
  ?>
  </BODY>
  </HTML>
  han shu de jian dan tiao yong :
  <HTML>
  <HEAD>
  <TITLE> jian dan de han shu </TITLE>
  </HEAD>
  <BODY>
  <FONT SIZE=5>
  <?
   function printBold($inputText) // ding yi function printBold()
   {
   print("<B>" . $inputText . "</B>"); //// da yin $inputText
   }
   print(" zhe xing mei you jia chong !<BR>\n"); // zhi jie da yin zi fu chuan
   printBold(" zhe xing jia chong le !!!"); // tiao yong function printBold() han shu
   print("<BR>\n");
   print(" zhe xing mei you jia chong !<BR>\n"); // zhi jie da yin zi fu chuan
  ?>
  </FONT>
  </BODY>
  </HTML>
  you fan hui zhi de han shu
  <HTML>
  <HEAD>
  <TITLE> you fan hui zhi de han shu </TITLE>
  </HEAD>
  <BODY>
  <FONT SIZE=5>
  <?
   function makeBold($inputText) // ding yi function makeBold() han shu
   {
   $boldedText = "<B>";
   $boldedText .= $inputText;
   $boldedText .= "</B>";
   return($boldedText); // fan hui bian liang $boldedText
   }
   print(" zhe xing mei you jia chong !!!<BR>\n"); // zhi jie da yin zi fu chuan
   print(makeBold(" zhe xing bei jia chong le !!!") . "<BR>\n");// tiao yong function makeBold() han shu
   print(" zhe xing mei you jia chong !!!<BR>\n"); // zhi jie da yin zi fu chuan
  ?>
  </SIZE>
  </BODY>
  </HTML>
  you mo ren shen shu de han shu
  <HTML>
  <HEAD>
  <TITLE> you mo ren shen shu de han shu </TITLE>
  </HEAD>
  <BODY>
  <FONT SIZE=5>
  <?
   function printColored($Text, $Color="black") // ding yi function han shu
   {
   print("<FONT COLOR=\"$Color\">$Text</FONT>"); // huo qu zi fu chuan de nei rong he yan se
   }
   printColored(" zhe shi hei yan se de zi !"); // tiao yong function han shu
   print("<BR><BR>\n");
   printColored(" zhe shi lan yan se de zi !", "blue"); // tiao yong function han shu
   print("<BR>\n");
  ?>
  </SIZE>
  </BODY>
  </HTML>
  yong de gui suan fa pan duan shi fou shi zheng shu
  <HTML>
  <HEAD>
  <TITLE> pan duan zheng shu </TITLE>
  </HEAD>
  <BODY>
  <?
   function checkInteger($Number)
   {
   if($Number > 1)
   {
   /* zheng shu jian 1 reng ran shi zheng shu */
   return(checkInteger($Number-1));
   }
   elseif($Number < 0)
   {
   /* dui yu yi ge fu shu ,*/
   /* ke yi fen xi ta de jue dui zhi */
   return(checkInteger((-1)*$Number-1));// qu jue dui zhi , ba fu shu an zheng shu fen xi
   }
   else
   {
   if(($Number > 0) AND ($Number < 1))
   {
   return(" dang ran bu shi ");
   }
   else
   {
   /* 0 he 1 shi zheng shu */
   /* gen ju xiang guan shu xue ding yi */
   return(" shi de ");
   }
   }
   }
   print("<B>0 shi zheng shu ma ?</B>" .
   checkInteger(0) . "<BR>\n");
   print("<B>7 shi zheng shu ma ?</B> " .
   checkInteger(7) . "<BR>\n");
   print("<B>3.5 ne ?</B>" . checkInteger(3.5) . "<BR>\n");
   print("<B> na me -5 ne ?</B>" . checkInteger(-5) . "<BR>\n");
   print("<B> huan you -9.2?</B>" . checkInteger(-9.2) . "<BR>\n");
  ?>
  </BODY>
  </HTML>
  chu shi hua shu zu
  <HTML>
  <HEAD>
  <TITLE> chu shi hua shu zu </TITLE>
  </HEAD>
  <FONT SIZE=5>
  <?
   $monthName = array(1=>"January", "February", "March",// chu shi hua yi ge shu zu
   "April", "May", "June", "July", "August",
   "September", "October", "November", "December");
   print(" ying yu de “5 yue ” shi <B> $monthName[5] </B>。<BR>\n");// da yin shu zu zhong de di 6 ge yuan su
  ?>
  </FONT>
  </BODY>
  </HTML>
  huo qu shu zu zhong de yuan su
  <HTML>
  <HEAD>
  <TITLE> huo qu shu zu zhong de yuan su </TITLE>
  </HEAD>
  <?
   $monthName = array(
   /* ding yi $monthName[1] dao $monthName[12]*/
   1=>"January", "February", "March",
   "April", "May", "June",
   "July", "August", "September",
   "October", "November", "December",
   /* ding yi $monthName["Jan"] dao $monthName["Dec"]*/
   "Jan"=>"January", "Feb"=>"February",
   "Mar"=>"March", "Apr"=>"April",
   "May"=>"May", "Jun"=>"June",
   "Jul"=>"July", "Aug"=>"August",
   "Sep"=>"September", "Oct"=>"October",
   "Nov"=>"November", "Dec"=>"December",
   /* ding yi $monthName["Jan"] dao $monthName["Dec"]*/
   "January"=>"January", "February"=>"February",
   "March"=>"March", "April"=>"April",
   "May"=>"May", "June"=>"June",
   "July"=>"July", "August"=>"August",
   "September"=>"September", "October"=>"October",
   "November"=>"November", "December"=>"December"
   );
   /* da yin xiang guan de yuan su */
   print("Month <B>5</B> is <B>" . $monthName[5]. "</B><BR>\n");
   print("Month <B>Aug</B> is <B>" . $monthName["Aug"] . "</B><BR>\n");
   print("Month <B>June</B> is <B>" . $monthName["June"] . "</B><BR>\n");
  ?>
  </BODY>
  </HTML>
  chuang jian yi ge duo wei shu zu
  <HTML>
  <HEAD>
  <TITLE> chuang jian yi ge duo wei shu zu </TITLE>
  </HEAD>
  <?
   $Cities = array( // er wei shu zu array()
   " hua bei di qu "=>array(
   " bei jing shi ",
   " tian jin shi ",
   " shi jia zhuang "
   ),
   " xi bei di qu "=>array(
   " xi an ",
   " la sa "
   )
   );
   print(" hua bei di qu : ".$Cities[" hua bei di qu "][0]); // da yin $Cities[" hua bei di qu "][0]
  ?>
  </BODY>
  </HTML>
  PHP 4.0 shi xian biao ge zhuang da yin
  <HTML>
  <HEAD>
  <TITLE> shi xian biao ge zhuang da yin </TITLE>
  </HEAD>
  <BODY>
  <?
   /*
   ** shu ju biao ge hua
   */
   print("<TABLE bgcolor='ffccoo' BORDER=\"1\">\n"); // biao ge kai shi
  
   for($Row=1; $Row <= 12; $Row ++)
   {
   print("<TR>\n"); // kai shi xing
   // do each column
   for($Column=1; $Column <= 12; $Column ++)
   {
   print("<TD>");// kai shi lie
   print($Row * $Column);// biao ge yuan su cheng ji
   print("</TD>");
   }
   print("</TR>\n"); // xing jie shu
   }
  
   print("</TABLE>\n"); // biao ge jie shu
  ?>
  </BODY>
  </HTML>
  cha kan xi tong de yi xie bian liang
  <HTML>
  <HEAD>
  <TITLE> cha kan PHP de huan jing bian liang </TITLE>
  </HEAD>
  <BODY>
  <?
   print(" ni zheng zai yong wen jian de ming zi wei : ");
   print(__FILE__);
   print(" <BR>\n");
   print("<hr>");
   print(" ni de cao zuo xi tong wei : ");
   print(PHP_OS);
   print("<hr>");
   print(" ni de php de ban ben wei : ");
   print(PHP_VERSION)
  ?>
  </BODY>
  </HTML>
  da kai ben di huo zhe yuan cheng wen jian
  <HTML>
  <HEAD>
  <TITLE> da kai ben di huo zhe yuan cheng wen jian </TITLE>
  </HEAD>
  <BODY>
  <?
   print("<H3> tong guo http xie yi da kai wen jian </H3>\n");
   // tong guo http xie yi da kai wen jian
   if(!($myFile = fopen("d:web/web/php/test/data.txt", "r")))
   {
   print(" wen jian bu neng da kai ");
   exit;
   }
   while(!feof($myFile)) // xun huan
   {
   // an xing du qu wen jian zhong de nei rong
   $myLine = fgetss($myFile, 255);
   print("$myLine <BR>\n");
   }
   // guan bi wen jian de ju bing
   fclose($myFile);
  ?>
  </BODY>
  </HTML>
  da kai wen jian de ji zhong fang shi bi jiao
  <HTML>
  <HEAD>
  <TITLE> du qu wen jian nei rong </TITLE>
  </HEAD>
  <BODY>
  <?
   // da kai wen jian tong shi da yin wen jian de mei yi ge zi fu
   if($myFile = fopen("data.txt", "r"))
   {
   while(!feof($myFile))
   {
   $myCharacter = fgetc($myFile);
   print($myCharacter);
   }
   fclose($myFile);
   }
  ?>
  <? print("<hr>");?>
  <?
   // da kai wen jian tong shi da yin wen jian de mei yi xing
   if($myFile = fopen("data.txt", "r"))
   {
   while(!feof($myFile))
   {
   $myLine = fgets($myFile, 255);
   print($myLine);
   }
   fclose($myFile);
   }
  ?>
  <? print("<hr>");?>
  <?
   /* da kai wen jian tong shi da yin wen jian de mei yi xing ,
   tong shi qu diao qu hui zi fu chuan zhong de HTML yu yan
   */
   if($myFile = fopen("data.txt", "r"))
   {
   while(!feof($myFile))
   {
   $myLine = fgetss($myFile, 255);
   print($myLine);
   }
   fclose($myFile);
   }
  ?>
  </BODY>
  </HTML>
  fang wen wen jian chang jian shu xing
  <HTML>
  <HEAD>
  <TITLE> fang wen wen jian chang jian shu xing </TITLE>
  </HEAD>
  <BODY>
  <BR>
  <?
   print(" wen jian de suo you zhe (UID zhi ):");
   print(fileowner("data.txt")."<br>");
   print(" wen jian de da xiao :");
   print(filesize("data.txt")."<br>");
   print(" wen jian de lei xing :");
   print(filetype("data.txt")."<br>");
  ?>
  </BODY>
  </HTML>
  tiao yong wen ben wen jian nei rong
  <HTML>
  <HEAD>
  <TITLE> tiao yong wen ben wen jian nei rong </TITLE>
  </HEAD>
  <BODY>
  <CENTER>
  <?
   // da kai wen jian tong shi , da yin mei yi xing
   $myFile = file( "data.txt");
   for($index = 0; $index < count($myFile); $index++)
   {
   print($myFile[$index]."<BR>");
   }
  ?>
  </CENTER>
  </BODY>
  </HTML>
  chuang jian mu lu han shu
  <HTML>
  <HEAD>
  <TITLE> chuang jian mu lu han shu </TITLE>
  </HEAD>
  <BODY>
  <?
   if(mkdir("myDir1", 0777)) // chuang jian mu lu de han shu
   {
   print(" mu lu chuang jian cheng gong "); // mu lu jian li cheng gong
   }
   else
   {
   print(" mu lu jian li shi bai !"); // mu lu jian li shi bai
   }
  ?>
  </BODY>
  </HTML>
  liu lan mu lu
  <HTML>
  <HEAD>
  <TITLE> liu lan mu lu </TITLE>
  </HEAD>
  <BODY>
  <?
   // shi yong biao ge liu lan mu lu de jie gou
   print("<TABLE BORDER=\"1\">\n");
   // chuang jian biao ge de tou
   print("<TR><font color='red'>\n");
   print("<TH> wen jian ming </TH>\n");
   print("<TH> wen jian de da xiao </TH>\n");
   print("</font></TR>\n");
   $myDirectory = opendir("."); // jian li cao zuo mu lu de ju bing
   // du chu mu lu zhong de mei yi ge zi xiang
   while($entryName = readdir($myDirectory))
   {
   print("<TR>");
   print("<TD>$entryName</TD>");
   print("<TD ALIGN=\"right\">");
   print(filesize($entryName));
   print("</TD>");
   print("</TR>\n");
   }
   closedir($myDirectory); // guan bi mu lu
   print("</TABLE>\n");
  ?>
  </BODY>
  </HTML>
  PHP xiang guan xin xi
  <HTML>
  <HEAD>
  <TITLE>PHP xiang guan xin xi </TITLE>
  </HEAD>
  <BODY>
  <?
   phpinfo();
  ?>
  </BODY>
  </HTML>
  chang yong de shu zhi pan duan han shu
  <HTML>
  <HEAD>
  <TITLE> chang yong de shu zhi pan duan han shu </TITLE>
  </HEAD>
  <BODY>
  <?
   // pan duan shu zu
   $colors = array("red", "blue", "green");
   if(is_array($colors))
   {
   print("colors is an array"."<br>");
   }
   // shuang jing du shu pan duan
   $Temperature = 15.23;
   if(is_double($Temperature))
   {
   print("Temperature is a double"."<br>");
   }
   // zheng shu pan duan
   $PageCount = 2234;
   if(is_integer($PageCount))
   {
   print("$PageCount is an integer"."<br>");
   }
   // dui xiang pan duan
   class widget
   {
   var $name;
   var $length;
   }
   $thing = new widget;
   if(is_object($thing))
   {
   print("thing is an object"."<br>");
   }
   // zi fu pan duan
   $Greeting = "Hello";
   if(is_string($Greeting))
   {
   print("Greeting is a string"."<br>");
   }
  ?>
  </BODY>
  </HTML>
  wen jian shang chuan jie mian
  <HTML>
  <HEAD>
  <TITLE> wen jian shang chuan jie mian </TITLE>
  </HEAD>
  <BODY><TABLE><CENTER>
  <?
  if($UploadAction){
  $UploadAction=0;
  $TimeLimit=60;
  /* she zhi chao shi xian zhi shi jian mo ren shi jian wei 30s, she zhi wei 0 shi wei bu xian shi */
  set_time_limit($TimeLimit);
  If(($Upfile != "none")&&
  ($Upfile != ""))
  {
  $Filepath="d:\web\web\php\test"; // shang zai wen jian cun fang lu jing
  $FileName=$Filepath.$Upfile_name;
  if($Upfile_size <1024) // shang zai wen jian da xiao
  {$FileSize = (string)$Upfile_size . " zi jie ";}
  elseif($Upfile_size <(1024 * 1024))
  {
  $FileSize = number_format((double)($Upfile_size / 1024), 1) . " KB";
  }
  else
  {
  $FileSize = number_format((double)($Upfile_size/(1024*1024)),1)."MB";
  }
  if(!file_exists($FileName))
  {
  if(copy($Upfile,$FileName))
  {unlink($Upfile);
  echo "<br><br>\n";
  echo " wen jian $Upfile_name yi shang zai cheng gong !";
  echo "<br><br>\n";
  echo " wen jian wei zhi :$FileName";
  echo "<br><br>\n";
  echo " wen jian da xiao :$FileSize";
  echo "<br><br>\n";
  }
  else
  {echo " wen jian $Upfile_name shang zai shi bai !"; }
  }
  else
  {echo " wen jian $Upfile_name yi jing cun zai !"; }
  }
  else
  {echo " ni mei you xuan ze ren he wen jian shang zai !"; }
  set_time_limit(30); // hui fu mo ren chao shi she zhi
  }
  ?>
  <FORM ENCTYPE = "multipart/form-data" NAME = "SubmitForm"
  ACTION = "default.php" METHOD = "POST">
  <INPUT TYPE = "hidden" NAME = "MAX_FILE_SIZE" VALUE ="1000000">
  <INPUT TYPE = "hidden" NAME = "UploadAction" VALUE = "1">
  <TR><TD><INPUT NAME = "Upfile" TYPE = "file" SIZE = "30"></TD>
  </TR><TR><TD><INPUT NAME = "submit" VALUE = " ti jiao " TYPE = "submit">
  <INPUT NAME = "reset" VALUE = " chong zhi " TYPE = "reset"></TD>
  </TR></FORM></CENTER></TABLE>
  </BODY>
  </HTML>【原文】【汉音对照
 
 
 
 
 
 
 
 
 
日版宠物情人插曲《Winding Road》歌词

日版宠物情人2017的插曲,很带节奏感,日语的,女生唱的。 最后听见是在第8集的时候女主手割伤了,然后男主用嘴帮她吸了一下,插曲就出来了。 歌手:Def...

兄弟共妻,我成了他们夜里的美食

老钟家的两个儿子很特别,就是跟其他的人不太一样,魔一般的执着。兄弟俩都到了要结婚的年龄了,不管自家老爹怎么磨破嘴皮子,兄弟俩说不娶就不娶,老父母为兄弟两操碎了心...

如何磨出破洞牛仔裤?牛仔裤怎么剪破洞?

把牛仔裤磨出有线的破洞 1、具体工具就是磨脚石,下面垫一个硬物,然后用磨脚石一直磨一直磨,到把那块磨薄了,用手撕开就好了。出来的洞啊很自然的。需要猫须的话调几...

我就是扫描下图得到了敬业福和爱国福

先来看下敬业福和爱国福 今年春节,支付宝再次推出了“五福红包”活动,表示要“把欠大家的敬业福都还给大家”。 今天该活动正式启动,和去年一样,需要收集“五福”...

冰箱异味产生的原因和臭味去除的方法

有时候我们打开冰箱就会闻到一股异味,冰箱里的这种异味是因为一些物质发出的气味的混合体,闻起来让人恶心。 产生这些异味的主要原因有以下几点。 1、很多人有这种习...

 
 
jing dian xun huan li zi <HTML> <HEAD> <TITLE> jing dian xun huan li zi </TITLE> </HEAD> <BODY> <? for($counter = 1; $counter <= 6; $counter++) // xun huan 6 ci { print("<B>counter is $counter</B><BR>\n"); // da yin 6 ci } ?> </BODY> </HTML> for de gao ji yun yong <HTML> <HEAD> <TITLE>for de gao ji yun yong </TITLE> </HEAD> <BODY> <? /* ** da yin bi yao de shuo ming wen zi */ print("<B> ju li xing qi yi huan you ji tian ?</B>\n"); print("<OL>\n"); for($currentDate = date("U"); // ding yi $currentDate shi jian ge shi date("l", $currentDate) != "Monday"; // pan duan shi bu shi dang qian xi tong shi jian shi Monday $currentDate += (60 * 60 * 24)) // dang qian shi jian jia shang 1 tian { /* ** da yin shi jian ming cheng */ print("<LI>" . date("l", $currentDate) . "\n"); } print("</OL>\n"); ?> </BODY> </HTML> han shu de jian dan tiao yong : <HTML> <HEAD> <TITLE> jian dan de han shu </TITLE> </HEAD> <BODY> <FONT SIZE=5> <? function printBold($inputText) // ding yi function printBold() { print("<B>" . $inputText . "</B>"); //// da yin $inputText } print(" zhe xing mei you jia chong !<BR>\n"); // zhi jie da yin zi fu chuan printBold(" zhe xing jia chong le !!!"); // tiao yong function printBold() han shu print("<BR>\n"); print(" zhe xing mei you jia chong !<BR>\n"); // zhi jie da yin zi fu chuan ?> </FONT> </BODY> </HTML> you fan hui zhi de han shu <HTML> <HEAD> <TITLE> you fan hui zhi de han shu </TITLE> </HEAD> <BODY> <FONT SIZE=5> <? function makeBold($inputText) // ding yi function makeBold() han shu { $boldedText = "<B>"; $boldedText .= $inputText; $boldedText .= "</B>"; return($boldedText); // fan hui bian liang $boldedText } print(" zhe xing mei you jia chong !!!<BR>\n"); // zhi jie da yin zi fu chuan print(makeBold(" zhe xing bei jia chong le !!!") . "<BR>\n");// tiao yong function makeBold() han shu print(" zhe xing mei you jia chong !!!<BR>\n"); // zhi jie da yin zi fu chuan ?> </SIZE> </BODY> </HTML> you mo ren shen shu de han shu <HTML> <HEAD> <TITLE> you mo ren shen shu de han shu </TITLE> </HEAD> <BODY> <FONT SIZE=5> <? function printColored($Text, $Color="black") // ding yi function han shu { print("<FONT COLOR=\"$Color\">$Text</FONT>"); // huo qu zi fu chuan de nei rong he yan se } printColored(" zhe shi hei yan se de zi !"); // tiao yong function han shu print("<BR><BR>\n"); printColored(" zhe shi lan yan se de zi !", "blue"); // tiao yong function han shu print("<BR>\n"); ?> </SIZE> </BODY> </HTML> yong de gui suan fa pan duan shi fou shi zheng shu <HTML> <HEAD> <TITLE> pan duan zheng shu </TITLE> </HEAD> <BODY> <? function checkInteger($Number) { if($Number > 1) { /* zheng shu jian 1 reng ran shi zheng shu */ return(checkInteger($Number-1)); } elseif($Number < 0) { /* dui yu yi ge fu shu ,*/ /* ke yi fen xi ta de jue dui zhi */ return(checkInteger((-1)*$Number-1));// qu jue dui zhi , ba fu shu an zheng shu fen xi } else { if(($Number > 0) AND ($Number < 1)) { return(" dang ran bu shi "); } else { /* 0 he 1 shi zheng shu */ /* gen ju xiang guan shu xue ding yi */ return(" shi de "); } } } print("<B>0 shi zheng shu ma ?</B>" . checkInteger(0) . "<BR>\n"); print("<B>7 shi zheng shu ma ?</B> " . checkInteger(7) . "<BR>\n"); print("<B>3.5 ne ?</B>" . checkInteger(3.5) . "<BR>\n"); print("<B> na me -5 ne ?</B>" . checkInteger(-5) . "<BR>\n"); print("<B> huan you -9.2?</B>" . checkInteger(-9.2) . "<BR>\n"); ?> </BODY> </HTML> chu shi hua shu zu <HTML> <HEAD> <TITLE> chu shi hua shu zu </TITLE> </HEAD> <FONT SIZE=5> <? $monthName = array(1=>"January", "February", "March",// chu shi hua yi ge shu zu "April", "May", "June", "July", "August", "September", "October", "November", "December"); print(" ying yu de “5 yue ” shi <B> $monthName[5] </B>。<BR>\n");// da yin shu zu zhong de di 6 ge yuan su ?> </FONT> </BODY> </HTML> huo qu shu zu zhong de yuan su <HTML> <HEAD> <TITLE> huo qu shu zu zhong de yuan su </TITLE> </HEAD> <? $monthName = array( /* ding yi $monthName[1] dao $monthName[12]*/ 1=>"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", /* ding yi $monthName["Jan"] dao $monthName["Dec"]*/ "Jan"=>"January", "Feb"=>"February", "Mar"=>"March", "Apr"=>"April", "May"=>"May", "Jun"=>"June", "Jul"=>"July", "Aug"=>"August", "Sep"=>"September", "Oct"=>"October", "Nov"=>"November", "Dec"=>"December", /* ding yi $monthName["Jan"] dao $monthName["Dec"]*/ "January"=>"January", "February"=>"February", "March"=>"March", "April"=>"April", "May"=>"May", "June"=>"June", "July"=>"July", "August"=>"August", "September"=>"September", "October"=>"October", "November"=>"November", "December"=>"December" ); /* da yin xiang guan de yuan su */ print("Month <B>5</B> is <B>" . $monthName[5]. "</B><BR>\n"); print("Month <B>Aug</B> is <B>" . $monthName["Aug"] . "</B><BR>\n"); print("Month <B>June</B> is <B>" . $monthName["June"] . "</B><BR>\n"); ?> </BODY> </HTML> chuang jian yi ge duo wei shu zu <HTML> <HEAD> <TITLE> chuang jian yi ge duo wei shu zu </TITLE> </HEAD> <? $Cities = array( // er wei shu zu array() " hua bei di qu "=>array( " bei jing shi ", " tian jin shi ", " shi jia zhuang " ), " xi bei di qu "=>array( " xi an ", " la sa " ) ); print(" hua bei di qu : ".$Cities[" hua bei di qu "][0]); // da yin $Cities[" hua bei di qu "][0] ?> </BODY> </HTML> PHP 4.0 shi xian biao ge zhuang da yin <HTML> <HEAD> <TITLE> shi xian biao ge zhuang da yin </TITLE> </HEAD> <BODY> <? /* ** shu ju biao ge hua */ print("<TABLE bgcolor='ffccoo' BORDER=\"1\">\n"); // biao ge kai shi for($Row=1; $Row <= 12; $Row ++) { print("<TR>\n"); // kai shi xing // do each column for($Column=1; $Column <= 12; $Column ++) { print("<TD>");// kai shi lie print($Row * $Column);// biao ge yuan su cheng ji print("</TD>"); } print("</TR>\n"); // xing jie shu } print("</TABLE>\n"); // biao ge jie shu ?> </BODY> </HTML> cha kan xi tong de yi xie bian liang <HTML> <HEAD> <TITLE> cha kan PHP de huan jing bian liang </TITLE> </HEAD> <BODY> <? print(" ni zheng zai yong wen jian de ming zi wei : "); print(__FILE__); print(" <BR>\n"); print("<hr>"); print(" ni de cao zuo xi tong wei : "); print(PHP_OS); print("<hr>"); print(" ni de php de ban ben wei : "); print(PHP_VERSION) ?> </BODY> </HTML> da kai ben di huo zhe yuan cheng wen jian <HTML> <HEAD> <TITLE> da kai ben di huo zhe yuan cheng wen jian </TITLE> </HEAD> <BODY> <? print("<H3> tong guo http xie yi da kai wen jian </H3>\n"); // tong guo http xie yi da kai wen jian if(!($myFile = fopen("d:web/web/php/test/data.txt", "r"))) { print(" wen jian bu neng da kai "); exit; } while(!feof($myFile)) // xun huan { // an xing du qu wen jian zhong de nei rong $myLine = fgetss($myFile, 255); print("$myLine <BR>\n"); } // guan bi wen jian de ju bing fclose($myFile); ?> </BODY> </HTML> da kai wen jian de ji zhong fang shi bi jiao <HTML> <HEAD> <TITLE> du qu wen jian nei rong </TITLE> </HEAD> <BODY> <? // da kai wen jian tong shi da yin wen jian de mei yi ge zi fu if($myFile = fopen("data.txt", "r")) { while(!feof($myFile)) { $myCharacter = fgetc($myFile); print($myCharacter); } fclose($myFile); } ?> <? print("<hr>");?> <? // da kai wen jian tong shi da yin wen jian de mei yi xing if($myFile = fopen("data.txt", "r")) { while(!feof($myFile)) { $myLine = fgets($myFile, 255); print($myLine); } fclose($myFile); } ?> <? print("<hr>");?> <? /* da kai wen jian tong shi da yin wen jian de mei yi xing , tong shi qu diao qu hui zi fu chuan zhong de HTML yu yan */ if($myFile = fopen("data.txt", "r")) { while(!feof($myFile)) { $myLine = fgetss($myFile, 255); print($myLine); } fclose($myFile); } ?> </BODY> </HTML> fang wen wen jian chang jian shu xing <HTML> <HEAD> <TITLE> fang wen wen jian chang jian shu xing </TITLE> </HEAD> <BODY> <BR> <? print(" wen jian de suo you zhe (UID zhi ):"); print(fileowner("data.txt")."<br>"); print(" wen jian de da xiao :"); print(filesize("data.txt")."<br>"); print(" wen jian de lei xing :"); print(filetype("data.txt")."<br>"); ?> </BODY> </HTML> tiao yong wen ben wen jian nei rong <HTML> <HEAD> <TITLE> tiao yong wen ben wen jian nei rong </TITLE> </HEAD> <BODY> <CENTER> <? // da kai wen jian tong shi , da yin mei yi xing $myFile = file( "data.txt"); for($index = 0; $index < count($myFile); $index++) { print($myFile[$index]."<BR>"); } ?> </CENTER> </BODY> </HTML> chuang jian mu lu han shu <HTML> <HEAD> <TITLE> chuang jian mu lu han shu </TITLE> </HEAD> <BODY> <? if(mkdir("myDir1", 0777)) // chuang jian mu lu de han shu { print(" mu lu chuang jian cheng gong "); // mu lu jian li cheng gong } else { print(" mu lu jian li shi bai !"); // mu lu jian li shi bai } ?> </BODY> </HTML> liu lan mu lu <HTML> <HEAD> <TITLE> liu lan mu lu </TITLE> </HEAD> <BODY> <? // shi yong biao ge liu lan mu lu de jie gou print("<TABLE BORDER=\"1\">\n"); // chuang jian biao ge de tou print("<TR><font color='red'>\n"); print("<TH> wen jian ming </TH>\n"); print("<TH> wen jian de da xiao </TH>\n"); print("</font></TR>\n"); $myDirectory = opendir("."); // jian li cao zuo mu lu de ju bing // du chu mu lu zhong de mei yi ge zi xiang while($entryName = readdir($myDirectory)) { print("<TR>"); print("<TD>$entryName</TD>"); print("<TD ALIGN=\"right\">"); print(filesize($entryName)); print("</TD>"); print("</TR>\n"); } closedir($myDirectory); // guan bi mu lu print("</TABLE>\n"); ?> </BODY> </HTML> PHP xiang guan xin xi <HTML> <HEAD> <TITLE>PHP xiang guan xin xi </TITLE> </HEAD> <BODY> <? phpinfo(); ?> </BODY> </HTML> chang yong de shu zhi pan duan han shu <HTML> <HEAD> <TITLE> chang yong de shu zhi pan duan han shu </TITLE> </HEAD> <BODY> <? // pan duan shu zu $colors = array("red", "blue", "green"); if(is_array($colors)) { print("colors is an array"."<br>"); } // shuang jing du shu pan duan $Temperature = 15.23; if(is_double($Temperature)) { print("Temperature is a double"."<br>"); } // zheng shu pan duan $PageCount = 2234; if(is_integer($PageCount)) { print("$PageCount is an integer"."<br>"); } // dui xiang pan duan class widget { var $name; var $length; } $thing = new widget; if(is_object($thing)) { print("thing is an object"."<br>"); } // zi fu pan duan $Greeting = "Hello"; if(is_string($Greeting)) { print("Greeting is a string"."<br>"); } ?> </BODY> </HTML> wen jian shang chuan jie mian <HTML> <HEAD> <TITLE> wen jian shang chuan jie mian </TITLE> </HEAD> <BODY><TABLE><CENTER> <? if($UploadAction){ $UploadAction=0; $TimeLimit=60; /* she zhi chao shi xian zhi shi jian mo ren shi jian wei 30s, she zhi wei 0 shi wei bu xian shi */ set_time_limit($TimeLimit); If(($Upfile != "none")&& ($Upfile != "")) { $Filepath="d:\web\web\php\test"; // shang zai wen jian cun fang lu jing $FileName=$Filepath.$Upfile_name; if($Upfile_size <1024) // shang zai wen jian da xiao {$FileSize = (string)$Upfile_size . " zi jie ";} elseif($Upfile_size <(1024 * 1024)) { $FileSize = number_format((double)($Upfile_size / 1024), 1) . " KB"; } else { $FileSize = number_format((double)($Upfile_size/(1024*1024)),1)."MB"; } if(!file_exists($FileName)) { if(copy($Upfile,$FileName)) {unlink($Upfile); echo "<br><br>\n"; echo " wen jian $Upfile_name yi shang zai cheng gong !"; echo "<br><br>\n"; echo " wen jian wei zhi :$FileName"; echo "<br><br>\n"; echo " wen jian da xiao :$FileSize"; echo "<br><br>\n"; } else {echo " wen jian $Upfile_name shang zai shi bai !"; } } else {echo " wen jian $Upfile_name yi jing cun zai !"; } } else {echo " ni mei you xuan ze ren he wen jian shang zai !"; } set_time_limit(30); // hui fu mo ren chao shi she zhi } ?> <FORM ENCTYPE = "multipart/form-data" NAME = "SubmitForm" ACTION = "default.php" METHOD = "POST"> <INPUT TYPE = "hidden" NAME = "MAX_FILE_SIZE" VALUE ="1000000"> <INPUT TYPE = "hidden" NAME = "UploadAction" VALUE = "1"> <TR><TD><INPUT NAME = "Upfile" TYPE = "file" SIZE = "30"></TD> </TR><TR><TD><INPUT NAME = "submit" VALUE = " ti jiao " TYPE = "submit"> <INPUT NAME = "reset" VALUE = " chong zhi " TYPE = "reset"></TD> </TR></FORM></CENTER></TABLE> </BODY> </HTML>
󰈣󰈤
  免责声明:本文仅代表作者个人观点,与王朝网络无关。王朝网络登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
情人节的清纯女生(9)
情人节的清纯女生(8)
情人节的清纯女生(7)
情人节的清纯女生(6)
山东蓬莱海边组照
一探哲蚌 II
一探哲蚌 III
古长城的一角
 
>>返回首页<<
 
 
 为你推荐
 
 
 
 转载本文
 UBB代码 HTML代码
复制到剪贴板...
 
 热帖排行
 
 
 
 
 
©2005- 王朝网络 版权所有