• 冒险村物语
  • 英雄无敌3塔防
  • 驾考家园手游

php实战第十二天

2014-09-05

 

 

/

 
大概用的时间是10小时左右,经过老师牛B哄哄的指导页面增色不少.

然后比赛的时候时间是两小时,学校的机房比较坑爹是ie6%20DW是2004的版本.

这源码的php部分仅仅是留言板

当时遇到一个编码错误的问题,原因是把%20mysql_query("set%20names%20utf8");放到了if语句里面..导致插入的时候不乱,读出的时候是?????问号一堆.


[php]
<?php 
   %20$conn=mysql_connect('localhost','root','1234'); 
   %20mysql_select_db('kefei'); 
   %20mysql_query("set%20names%20utf8"); 
   %20$result=mysql_query("select%20*%20from%20liuyan"); 
   %20while($row=mysql_fetch_assoc($result)){ 
       %20var_dump($row); 
 
 
   %20} 
 
 
?> 

<?php
 $conn=mysql_connect('localhost','root','1234');
 mysql_select_db('kefei');
 mysql_query("set%20names%20utf8");
 $result=mysql_query("select%20*%20from%20liuyan");
 while($row=mysql_fetch_assoc($result)){
  var_dump($row);


 }


?>

 

(免责声明:文章内容如涉及作品内容、版权和其它问题,请及时与我们联系,我们将在第一时间删除内容,文章内容仅供参考)

人气推荐

知识阅读

精彩推荐

  • 游戏
  • 软件
查看更多>>