一款简单实用的php操作mysql数据库类

前端之家收集整理的这篇文章主要介绍了一款简单实用的php操作mysql数据库类前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

本文实例讲述了一款简单实用的PHP操作MysqL数据库类。分享给大家供大家参考。具体如下:

代码如下:
数据库连接类,他会自动加载sql防注入功能,过滤一些敏感的SQL查询关键词,同时还可以增加判断字段 show table status的性质与show table类 获取数据库所有表名等。*/ @ini_set('MysqL.trace_mode','off'); class MysqL { public $dblink; public $pconnect; private $search = array('/union(s*(/*.**/)?s*)+select/i','/load_file(s*(/*.**/)?s*)+(/i','/into(s*(/*.**/)?s*)+outfile/i'); private $replace = array('union select','load_file (','into outfile'); private $rs;

function __construct($hostname,$username,$userpwd,$database,$pconnect=false,$charset='utf8')
{
define('allowed_htmltags','<meta><body><a><p><br><hr><h1><h2><h3><h4><h5><h6><font><u><i><b><h3><div><span><ol><ul><li><img><table><tr><td><map>');<br /> $this->pconnect=$pconnect;<br /> $this->dblink=$pconnect?<a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_pconnect($hostname,$userpwd):<a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_connect($hostname,$userpwd);<br /> (!$this->dblink||!is_resource($this->dblink)) && fatal_error("connect to the database unsuccessfully!");<br /> @<a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_unbuffered_query("set names {$charset}");<br /> if($this->version()>'5.0.1')<br /> {<br /> @<a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_unbuffered_query("set <a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a>_mode = ''");<br /> }<br /> @<a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_select_db($database) or fatal_error("can not select table!");<br /> return $this->dblink;<br /> } </p> <p>function query($<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a>,$unbuffered=false)<br /> {<br /> //echo $<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a>.'<br>';<br /> $this->rs=$unbuffered?<a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_unbuffered_query($<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a>,$this->dblink):<a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_query($<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a>,$this->dblink);<br /> //(!$this->rs||!is_resource($this->rs)) && fatal_error("execute the query unsuccessfully! error:".<a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_error());<br /> if(!$this->rs)fatal_error('在执行<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a>语句 '.$<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a>.' 时发生以下<a href="https://www.jb51.cc/tag/cuowu/" target="_blank" class="keywords">错误</a>:'.<a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_error());<br /> return $this->rs;<br /> } </p> <p>function fetch_one($<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a>)<br /> {<br /> $this->rs=$this->query($<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a>);<br /> return dircms_strips教程lashes($this->filter_pass(<a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_fetch_array($this->rs,<a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_assoc)));<br /> } </p> <p>function get_maxfield($filed='id',$table) // <a href="https://www.jb51.cc/tag/huoqu/" target="_blank" class="keywords">获取</a>$table表中$filed字段的最大值<br /> {<br /> $r=$this->fetch_one("select {$table}.{$filed} from <code>{$table}</code> order by <code>{$table}</code>.<code>{$filed}</code> desc limit 0,1");<br /> return $r[$filed];<br /> } </p> <p>function fetch_all($<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a>)<br /> {<br /> $this->rs=$this->query($<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a>);<br /> $result=array();<br /> while($rows=<a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_fetch_array($this->rs,<a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_assoc))<br /> {<br /> $result[]=$rows;<br /> } </p> <p><a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_free_result($this->rs);<br /> return dircms_stripslashes($this->filter_pass($result));<br /> } </p> <p>function fetch_all_withkey($<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a>,$key='id')<br /> {<br /> $this->rs=$this->query($<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a>);<br /> $result=array();<br /> while($rows=<a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_fetch_array($this->rs,<a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_assoc))<br /> {<br /> $result[$rows[$key]]=$rows;<br /> } </p> <p><a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_free_result($this->rs);<br /> return dircms_stripslashes($this->filter_pass($result));<br /> } </p> <p>function last_insert_id()<br /> {<br /> if(($insertid=<a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_insert_id($this->dblink))>0)return $insertid;<br /> else //如果 auto_increment 的列的类型是 bigint,则 <a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_insert_id() 返回的值将不正确.<br /> {<br /> $result=$this->fetch_one('select last_insert_id() as insertid');<br /> return $result['insertid'];<br /> }<br /> } </p> <p>function insert($tbname,$varray,$replace=false)<br /> {<br /> $varray=$this->escape($varray);<br /> $tb_fields=$this->get_fields($tbname); // <a href="https://www.jb51.cc/tag/shengji/" target="_blank" class="keywords">升级</a>一下,<a href="https://www.jb51.cc/tag/zengjia/" target="_blank" class="keywords">增加</a>判断字段是否存在 </p> <p>foreach($varray as $key => $value)<br /> {<br /> if(in_array($key,$tb_fields))<br /> {<br /> $fileds[]='<code>'.$key.'</code>';<br /> $values[]=is_string($value)?'''.$value.''':$value;<br /> }<br /> } </p> <p>if($fileds)<br /> {<br /> $fileds=implode(',',$fileds);<br /> $fileds=str_replace(''','`',$fileds);<br /> $values=implode(',$values);<br /> $<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a>=$replace?"replace into {$tbname}({$fileds}) values ({$values})":"insert into {$tbname}({$fileds}) values ({$values})";<br /> $this->query($<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a>,true);<br /> return $this->last_insert_id();<br /> }<br /> else return false;<br /> } </p> <p>function update($tbname,$array,$where = '')<br /> {<br /> $array=$this->escape($array);<br /> if($where)<br /> {<br /> $tb_fields=$this->get_fields($tbname); // <a href="https://www.jb51.cc/tag/zengjia/" target="_blank" class="keywords">增加</a>判断字段是否存在 </p> <p>$<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a> = '';<br /> foreach($array as $k=>$v)<br /> {<br /> if(in_array($k,$tb_fields))<br /> {<br /> $k=str_replace(''','',$k);<br /> $<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a> .= ",<code>$k</code>='$v'";<br /> }<br /> }<br /> $<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a> = substr($<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a>,1); </p> <p>if($<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a>)$<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a> = "update <code>$tbname</code> set $<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a> where $where";<br /> else return true;<br /> }<br /> else<br /> {<br /> $<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a> = "replace into <code>$tbname</code>(<code>".implode('</code>,<code>',array_keys($array))."</code>) values('".implode("','",$array)."')";<br /> }<br /> return $this->query($<a href="https://www.jb51.cc/tag/sql/" target="_blank" class="keywords">sql</a>,true);<br /> } </p> <p>function <a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_delete($tbname,$idarray,$filedname='id')<br /> {<br /> $idwhere=is_array($idarray)?implode(',$idarray):intval($idarray);<br /> $where=is_array($idarray)?"{$tbname}.{$filedname} in ({$idwhere})":" {$tbname}.{$filedname}={$idwhere}"; </p> <p>return $this->query("delete from {$tbname} where {$where}",true);<br /> } </p> <p>function get_fields($table)<br /> {<br /> $fields=array();<br /> $result=$this->fetch_all("show columns from <code>{$table}</code>");<br /> foreach($result as $val)<br /> {<br /> $fields[]=$val['field'];<br /> }<br /> return $fields;<br /> } </p> <p>function get_table_status($database)<br /> {<br /> $status=array();<br /> $r=$this->fetch_all("show table status from <code>".$database."</code>"); /////// show table status的性质与show table类似,不过,可以提供每个表的大量信息。<br /> foreach($r as $v)<br /> {<br /> $status[]=$v;<br /> }<br /> return $status;<br /> } </p> <p>function get_one_table_status($table)<br /> {<br /> return $this->fetch_one("show table status like '$table'");<br /> } </p> <p>function create_fields($tbname,$fieldname,$size=0,$type='varchar') // 2010-5-14 修正一下<br /> {<br /> if($size)<br /> {<br /> $size=strtoupper($type)=='varchar'?$size:8;<br /> $this->query("alter table <code>{$tbname}</code> add <code>$fieldname</code> {$type}( {$size} ) not null",true);<br /> }<br /> else $this->query("alter table <code>{$tbname}</code> add <code>$fieldname</code> mediumtext not null",true);<br /> return true;<br /> } </p> <p>function get_tables() //<a href="https://www.jb51.cc/tag/huoqu/" target="_blank" class="keywords">获取</a>所有表表名<br /> {<br /> $tables=array();<br /> $r=$this->fetch<em>all("show tables");<br /> foreach($r as $v)<br /> {<br /> foreach($v as $v</em>)<br /> {<br /> $tables[]=$v_;<br /> }<br /> }<br /> return $tables;<br /> } </p> <p>function create_model_table($tbname) //创建一个<a href="https://www.jb51.cc/tag/neirong/" target="_blank" class="keywords">内容</a>模型表(start:初始只有字段contentid int(20),用于<a href="https://www.jb51.cc/tag/neirong/" target="_blank" class="keywords">内容</a>表,/////////////////////// update:2010-5-20 默认加入<code>content</code> mediumtext not null,字段)<br /> {<br /> if(in_array($tbname,$this->get_tables())) return false; ///////////////////// 当表名已经存在时,返回 false<br /> if($this->query("create table <code>{$tbname}</code> (<br /> <code>contentid</code> mediumint(8) not null,<br /> <code>content</code> mediumtext not null,<br /> key ( <code>contentid</code> )<br /> ) engine = myisam default charset=utf8",true))return true; //////////////////// 成功则返回 true<br /> return false; //////////////失败返回 false<br /> } </p> <p>function create_table($tbname) //创建一个会员模型空表(初始只有字段userid int(20),用于会员表,2010-4-26)<br /> {<br /> if(in_array($tbname,$this->get_tables())) return false;<br /> if($this->query("create table <code>{$tbname}</code> (<br /> <code>userid</code> mediumint(8) not null,<br /> key ( <code>userid</code> )<br /> ) engine = myisam default charset=utf8",true))return true;<br /> return false;<br /> } </p> <p>function escape($str) // 过滤危险字符<br /> {<br /> if(!is_array($str)) return str_replace(array('n','r'),array(chr(10),chr(13)),<a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_real_escape_string(preg_replace($this->search,$this->replace,$str),$this->dblink));<br /> foreach($str as $key=>$val) $str[$key] = $this->escape($val);<br /> return $str;<br /> } </p> <p>function filter_pass($string,$allowedtags = '',$disabledattributes = array('onabort','onactivate','onafterprint','onafterupdate','onbeforeactivate','onbeforecopy','onbeforecut','onbeforedeactivate','onbeforeeditfocus','onbeforepaste','onbeforeprint','onbeforeunload','onbeforeupdate','onblur','onbounce','oncellchange','onchange','onclick','oncontextmenu','oncontrolselect','oncopy','oncut','ondataavaible','ondatasetchanged','ondatasetcomplete','ondblclick','ondeactivate','ondrag','ondragdrop','ondragend','ondragenter','ondragleave','ondragover','ondragstart','ondrop','onerror','onerrorupdate','onfilterupdate','onfinish','onfocus','onfocusin','onfocusout','onhelp','onkeydown','onkeypress','onkeyup','onlayoutcomplete','onload','onlosecapture','onmousedown','onmouseenter','onmouseleave','onmousemove','onmoveout','onmou<a href="https://www.jb51.cc/tag/SEO/" title="SEO">SEO</a>教程ver','onmouseup','onmousewheel','onmove','onmoveend','onmovestart','onpaste','onpropertychange','onreadystatechange','onreset','onresize','onresizeend','onresizestart','onrowexit','onrowsdelete','onrowsinserted','onscroll','onselect','onselectionchange','onselectstart','onstart','onstop','onsubmit','onunload'))<br /> {<br /> if(is_array($string))<br /> {<br /> foreach($string as $key => $val) $string[$key] = $this->filter_pass($val,allowed_htmltags);<br /> }<br /> else<br /> {<br /> $string = preg_replace('/s('.implode('|',$disabledattributes).').<em>?([s>])/','',preg_replace('/<(.</em>?)>/ie',"'<'.preg_replace(array('/网页特效:[^"']<em>/i','/(".implode('|',$disabledattributes).")[ ]</em>=[ ]<em>["'][^"']</em>["']/i','/s+/'),array('',' '),stripslashes('')) . '>'",strip_tags($string,$allowedtags)));<br /> }<br /> return $string;<br /> } </p> <p>function drop_table($tbname)<br /> {<br /> return $this->query("drop table if exists <code>{$tbname}</code>",true);<br /> } </p> <p>function version()<br /> {<br /> return <a href="https://www.jb51.cc/tag/MysqL/" target="_blank" class="keywords">MysqL</a>_get_server_info($this->dblink);<br /> }<br /> } </p> </div></p> <p>希望本文所述对大家的<a href="https://www.jb51.cc/tag/PHP/" target="_blank" class="keywords">PHP</a>程序设计有所帮助。</p><i class="glyphicon glyphicon-link"></i> 原文链接:https://www.f2er.com/php/23149.html</div> <div class="topcard-tags"><a href="https://www.f2er.com/tag/mysqlp/" class="tag_link" target="_blank">mysql</a><a href="https://www.f2er.com/tag/phpp/" class="tag_link" target="_blank">php</a><a href="https://www.f2er.com/tag/caozuo/" class="tag_link" target="_blank">操作</a><a href="https://www.f2er.com/tag/caozuop/" class="tag_link" target="_blank">操作</a><a href="https://www.f2er.com/tag/pcaozuo/" class="tag_link" target="_blank">操作</a><a href="https://www.f2er.com/tag/shujuku/" class="tag_link" target="_blank">数据库</a><a href="https://www.f2er.com/tag/shujukup/" class="tag_link" target="_blank">数据库</a><a href="https://www.f2er.com/tag/lei/" class="tag_link" target="_blank">类</a><a href="https://www.f2er.com/tag/leip/" class="tag_link" target="_blank">类</a><a href="https://www.f2er.com/tag/plei/" class="tag_link" target="_blank">类</a><a href="https://www.f2er.com/tag/leip/" class="tag_link" target="_blank">类</a></div> <ul class="list-group"> <li class="list-group-item"><a href="https://www.f2er.com/php/23150.html" title="php表单敏感字符过滤类">上一篇:php表单敏感字符过滤类</a><a href="https://www.f2er.com/php/23147.html" title="PHP原生函数一定好吗?" class="text-muted pull-right">下一篇:PHP原生函数一定好吗?</a> </li> </ul> </div> </div> </div> <!-- row end --> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-4605373693034661" data-ad-slot="9144498553"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script></div> </div> </div> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <div class="title"><h1>猜你在找的PHP相关文章</h1></div> <div class="list_con"> <a href="https://www.f2er.com/php/997740.html" title="Hessian通讯协议【附PHP源代码】"><img class="lazy" src="https://www.f2er.com/images/np.jpg" data-original="https://www.f2er.com/res/2021/02-22/19/361df348b2385424b031f281e9807f35.png" title="" width="160" height="90" style="float:right;margin-left:30px;display:none;" /><div class="title">Hessian通讯协议【附PHP源代码】</div> <div class="summary">Hessian开源的远程通讯,采用二进制 RPC的协议,基于 HTTP 传输。可以实现PHP调用Java,Pyt...</div> <time class="summary">作者:前端之家 时间:2021-02-22</time> </a> </div> <div class="list_con"> <a href="https://www.f2er.com/php/997739.html" title="初识Mongodb总结"><img class="lazy" src="https://www.f2er.com/images/np.jpg" data-original="https://www.f2er.com/res/2021/02-22/19/b4d39ef6acdce4fc3ef2fe713961a4c2.png" title="" width="160" height="90" style="float:right;margin-left:30px;display:none;" /><div class="title">初识Mongodb总结</div> <div class="summary">初识Mongodb的一些总结,在Mac Os X下真实搭建mongodb环境,以及分享个Mongodb管理工具,学习...</div> <time class="summary">作者:前端之家 时间:2021-02-22</time> </a> </div> <div class="list_con"> <a href="https://www.f2er.com/php/997738.html" title="初识Mongodb之[CURD]-PHP版"><img class="lazy" src="https://www.f2er.com/images/np.jpg" data-original="https://www.f2er.com/res/2021/02-22/19/d009a8111c246e74506457f4b9a3356b.png" title="" width="160" height="90" style="float:right;margin-left:30px;display:none;" /><div class="title">初识Mongodb之[CURD]-PHP版</div> <div class="summary">边看边操作,这样才能记得牢,实践是检验真理的唯一标准.光看不练假把式,光练不看傻把式,边看...</div> <time class="summary">作者:前端之家 时间:2021-02-22</time> </a> </div> <div class="list_con"> <a href="https://www.f2er.com/php/997665.html" title="php学习日志 - echo&print"><img class="lazy" src="https://www.f2er.com/images/np.jpg" data-original="https://www.f2er.com/res/2021/02-21/08/daa4210b68d9838740e9ea77a21307fa.png" title="" width="160" height="90" style="float:right;margin-left:30px;display:none;" /><div class="title">php学习日志 - echo&print</div> <div class="summary">在php中,结果输出一共有两种方式:echo和print,下面将对两种方式做一个比较。 echo与pri...</div> <time class="summary">作者:前端之家 时间:2021-02-21</time> </a> </div> <div class="list_con"> <a href="https://www.f2er.com/php/997664.html" title="The mbstring extension is missing. Please check your PHP configuration错误及解决方法"><img class="lazy" src="https://www.f2er.com/images/np.jpg" data-original="https://www.f2er.com/res/2021/02-21/08/eb187c62ac0c80d6e2af301e5b85d7cf.jpg" title="" width="160" height="90" style="float:right;margin-left:30px;display:none;" /><div class="title">The mbstring extension is missing. Please check your PHP configuration错误及解决方法</div> <div class="summary">在安装好wampServer后,一直没有使用phpMyAdmin,今天用了一下,phpMyAdmin显示错误:The m...</div> <time class="summary">作者:前端之家 时间:2021-02-21</time> </a> </div> <div style="border-bottom: 1px solid #f4f4f4;margin-top:20px;"> <ins class="adsbygoogle" style="display:block" data-ad-format="fluid" data-ad-layout-key="-fr-2o+fp-dx-wx" data-ad-client="ca-pub-4605373693034661" data-ad-slot="4561116489"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div><div class="list_con"> <a href="https://www.f2er.com/php/997662.html" title="解决Windows Live Writer错误:WindowsLive.Writer.CoreServices.HttpRequestHelper的类型初始值设定发生异常"><img class="lazy" src="https://www.f2er.com/images/np.jpg" data-original="https://www.f2er.com/res/2021/02-21/08/3dba7c0e337113c18e0d271e31375f92.png" title="" width="160" height="90" style="float:right;margin-left:30px;display:none;" /><div class="title">解决Windows Live Writer错误:WindowsLive.Writer.CoreServices.HttpRequestHelper的类型初始值设定发生异常</div> <div class="summary">以前用Windows Live Writer写日志都好好的,前几天用写完日志,点击发布,突然弹出意外错误...</div> <time class="summary">作者:前端之家 时间:2021-02-21</time> </a> </div> <div class="list_con"> <a href="https://www.f2er.com/php/997491.html" title="在PHP项目中使用Standford Moss代码查重系统"><div class="title">在PHP项目中使用Standford Moss代码查重系统</div> <div class="summary">Standford Moss 系统是斯坦福大学大名鼎鼎的代码查重系统,它可以查出哪些同学提交的代码是...</div> <time class="summary">作者:前端之家 时间:2021-02-18</time> </a> </div> <div class="list_con"> <a href="https://www.f2er.com/php/997490.html" title="Windows下PHP安全环境的搭建"><img class="lazy" src="https://www.f2er.com/images/np.jpg" data-original="https://www.f2er.com/res/2021/02-18/10/ae3043a3f014e5fde5c29d0449149db0.png" title="" width="160" height="90" style="float:right;margin-left:30px;display:none;" /><div class="title">Windows下PHP安全环境的搭建</div> <div class="summary">笔者一直在Windows环境下搭建PHP的运行环境,大大小小的运行环境用过不少,从开始的WAMP到...</div> <time class="summary">作者:前端之家 时间:2021-02-18</time> </a> </div> <div class="list_con"> <a href="https://www.f2er.com/php/997489.html" title="ThinkPHP5作业管理系统中处理学生未交作业与已交作业信息"><div class="title">ThinkPHP5作业管理系统中处理学生未交作业与已交作业信息</div> <div class="summary">在作业管理系统中,学生登陆到个人中心后可以通过左侧的菜单查看自己已经提交的作业和未提...</div> <time class="summary">作者:前端之家 时间:2021-02-18</time> </a> </div> <div class="list_con"> <a href="https://www.f2er.com/php/997488.html" title="ThinkPHP5项目目录规划实践"><div class="title">ThinkPHP5项目目录规划实践</div> <div class="summary">ThinkPHP5安装后(或者下载后的压缩文件解压后)可以看到下面的目录结构: 一般的信息管理...</div> <time class="summary">作者:前端之家 时间:2021-02-18</time> </a> </div> <div style="border-bottom: 1px solid #f4f4f4;margin-top:20px;"> <ins class="adsbygoogle" style="display:block" data-ad-format="fluid" data-ad-layout-key="-fr-2o+fp-dx-wx" data-ad-client="ca-pub-4605373693034661" data-ad-slot="4561116489"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div></div> </div> </div> </div> <!-- left end--> <!-- right --> <div class="col-sm-12 col-md-12 col-lg-3"> <!-- row --> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <label class="main-content-label ">编程分类</label> <div class="cate mt-20"><a href="https://www.f2er.com/php/" title="PHP">PHP</a><a href="https://www.f2er.com/java/" title="Java">Java</a><a href="https://www.f2er.com/javase/" title="Java SE">Java SE</a><a href="https://www.f2er.com/python/" title="Python">Python</a><a href="https://www.f2er.com/csharp/" title="C#">C#</a><a href="https://www.f2er.com/c/" title="C&C++">C&C++</a><a href="https://www.f2er.com/ruby/" title="Ruby">Ruby</a><a href="https://www.f2er.com/vb/" title="VB">VB</a><a href="https://www.f2er.com/aspnet/" title="asp.Net">asp.Net</a><a href="https://www.f2er.com/go/" title="Go">Go</a><a href="https://www.f2er.com/Perl/" title="Perl">Perl</a><a href="https://www.f2er.com/netty/" title="netty">netty</a><a href="https://www.f2er.com/django/" title="Django">Django</a><a href="https://www.f2er.com/delphi/" title="Delphi">Delphi</a><a href="https://www.f2er.com/jsp/" title="Jsp">Jsp</a><a href="https://www.f2er.com/netcore/" title=".NET Core">.NET Core</a><a href="https://www.f2er.com/spring/" title="Spring">Spring</a><a href="https://www.f2er.com/flask/" title="Flask">Flask</a><a href="https://www.f2er.com/springboot/" title="Springboot">Springboot</a><a href="https://www.f2er.com/springmvc/" title="SpringMVC">SpringMVC</a><a href="https://www.f2er.com/lua/" title="Lua">Lua</a><a href="https://www.f2er.com/laravel/" title="Laravel">Laravel</a><a href="https://www.f2er.com/mybatis/" title="Mybatis">Mybatis</a><a href="https://www.f2er.com/asp/" title="Asp">Asp</a><a href="https://www.f2er.com/groovy/" title="Groovy">Groovy</a><a href="https://www.f2er.com/thinkphp/" title="ThinkPHP">ThinkPHP</a><a href="https://www.f2er.com/yii/" title="Yii">Yii</a><a href="https://www.f2er.com/swoole/" title="swoole">swoole</a><div class="clearfix"></div> </div> </div> </div> </div> <!-- row end --> <!-- row --> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <!-- f2er-rightads --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4605373693034661" data-ad-slot="7756441254" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </div> <!-- row end --> <!-- row --> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <label class="main-content-label ">最新文章</label> <ul class="n-list"><li><a href="https://www.f2er.com/php/997740.html" title="Hessian通讯协议【附PHP源代码】" target="_blank">• Hessian通讯协议【附PHP源</a></li> <li><a href="https://www.f2er.com/php/997739.html" title="初识Mongodb总结" target="_blank">• 初识Mongodb总结</a></li> <li><a href="https://www.f2er.com/php/997738.html" title="初识Mongodb之[CURD]-PHP版" target="_blank">• 初识Mongodb之[CURD]-PHP版</a></li> <li><a href="https://www.f2er.com/php/997665.html" title="php学习日志 - echo&print" target="_blank">• php学习日志 - echo&p</a></li> <li><a href="https://www.f2er.com/php/997664.html" title="The mbstring extension is missing. Please check your PHP configuration错误及解决方法" target="_blank">• The mbstring extension i</a></li> <li><a href="https://www.f2er.com/php/997663.html" title="php学习日志 - php变量" target="_blank">• php学习日志 - php变量</a></li> <li><a href="https://www.f2er.com/php/997662.html" title="解决Windows Live Writer错误:WindowsLive.Writer.CoreServices.HttpRequestHelper的类型初始值设定发生异常" target="_blank">• 解决Windows Live Writer错</a></li> <li><a href="https://www.f2er.com/php/997491.html" title="在PHP项目中使用Standford Moss代码查重系统" target="_blank">• 在PHP项目中使用Standford</a></li> <li><a href="https://www.f2er.com/php/997490.html" title="Windows下PHP安全环境的搭建" target="_blank">• Windows下PHP安全环境的搭</a></li> <li><a href="https://www.f2er.com/php/997489.html" title="ThinkPHP5作业管理系统中处理学生未交作业与已交作业信息" target="_blank">• ThinkPHP5作业管理系统中处</a></li> </ul> </div> </div> </div> <!-- row end --> <!-- row --> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <label class="main-content-label ">热门标签 <span class="pull-right tx-12"> <a href="https://www.f2er.com/all" target="_blank">更多 ►</a></span> </label> <div class="topcard-tags"><a href="https://www.f2er.com/tag/wenjianshijian/" title="文件时间" target="_blank">文件时间</a><a href="https://www.f2er.com/tag/pythonm/" title="pythonm" target="_blank">pythonm</a><a href="https://www.f2er.com/tag/xiangdengxing/" title="相等性" target="_blank">相等性</a><a href="https://www.f2er.com/tag/PHPWarning/" title="PHP Warning" target="_blank">PHP Warning</a><a href="https://www.f2er.com/tag/shijianwenti/" title="时间问题" target="_blank">时间问题</a><a href="https://www.f2er.com/tag/wentijiejue/" title="问题解决" target="_blank">问题解决</a><a href="https://www.f2er.com/tag/pcntlsignal/" title="pcntl_signal()" target="_blank">pcntl_signal</a><a href="https://www.f2er.com/tag/caiyangdian/" title="采样点" target="_blank">采样点</a><a href="https://www.f2er.com/tag/wavmokuai/" title="wav模块" target="_blank">wav模块</a><a href="https://www.f2er.com/tag/dongtaiwenben/" title="动态文本" target="_blank">动态文本</a><a href="https://www.f2er.com/tag/diaoyongpinlvxianzhi/" title="调用频率限制" target="_blank">调用频率限制</a><a href="https://www.f2er.com/tag/duiwaibaolu/" title="对外暴露" target="_blank">对外暴露</a><a href="https://www.f2er.com/tag/duogefangwenqingqiu/" title="多个访问请求" target="_blank">多个访问请求</a><a href="https://www.f2er.com/tag/gengxinshujubiao/" title="更新数据表" target="_blank">更新数据表</a><a href="https://www.f2er.com/tag/moxingjiegou/" title="模型结构" target="_blank">模型结构</a><a href="https://www.f2er.com/tag/typefangfa/" title="type()方法" target="_blank">type()方法</a><a href="https://www.f2er.com/tag/bijiaosudu/" title="比较速度" target="_blank">比较速度</a><a href="https://www.f2er.com/tag/shouxieti/" title="手写体" target="_blank">手写体</a><a href="https://www.f2er.com/tag/sobelsuanzi/" title="sobel算子" target="_blank">sobel算子</a><a href="https://www.f2er.com/tag/baocunmoxing/" title="保存模型" target="_blank">保存模型</a><a href="https://www.f2er.com/tag/Imagelei/" title="Image类" target="_blank">Image类</a><a href="https://www.f2er.com/tag/nnConv2d/" title="nn.Conv2d" target="_blank">nn.Conv2d</a><a href="https://www.f2er.com/tag/pytorch10/" title="pytorch1.0" target="_blank">pytorch1.0</a><a href="https://www.f2er.com/tag/kaggle/" title="kaggle" target="_blank">kaggle</a><a href="https://www.f2er.com/tag/DCGAN/" title="DCGAN" target="_blank">DCGAN</a><a href="https://www.f2er.com/tag/jiaobingbi/" title="交并比" target="_blank">交并比</a><a href="https://www.f2er.com/tag/rangeyongfa/" title="range()用法" target="_blank">range()用法</a><a href="https://www.f2er.com/tag/dayinmoxing/" title="打印模型" target="_blank">打印模型</a><a href="https://www.f2er.com/tag/fanjuanji/" title="反卷积" target="_blank">反卷积</a><a href="https://www.f2er.com/tag/juanji/" title="卷积" target="_blank">卷积</a></div> </div> </div> </div> <!-- row end --> <!-- row --> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <!-- f2er-rightads --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4605373693034661" data-ad-slot="7756441254" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </div> <!-- row end --> </div> <!-- right end --> </div> </div> <footer id="footer"> <div class="container"> <div class="row hidden-xs"> <dl class="col-sm-6 site-link"> <dt>最近更新</dt><dd><a href="https://www.f2er.com/faq/884225.html" title="jQuery选择伪元素:after" target="_blank">· jQuery选择伪元素:after</a><span class="text-muted pull-right">10-20</span></dd> <dd><a href="https://www.f2er.com/faq/884224.html" title="JavaScript随机颜色生成器" target="_blank">· JavaScript随机颜色生成器</a><span class="text-muted pull-right">10-20</span></dd> <dd><a href="https://www.f2er.com/faq/884223.html" title="JavaScript指数" target="_blank">· JavaScript指数</a><span class="text-muted pull-right">10-20</span></dd> <dd><a href="https://www.f2er.com/faq/884222.html" title="addResourceHandlers无法解析静态资源" target="_blank">· addResourceHandlers无法解析静态资源</a><span class="text-muted pull-right">10-20</span></dd> <dd><a href="https://www.f2er.com/faq/884221.html" title="如何将字节数组转换为MultipartFile" target="_blank">· 如何将字节数组转换为MultipartFile</a><span class="text-muted pull-right">10-20</span></dd> <dd><a href="https://www.f2er.com/faq/884220.html" title="在java中如何创建一个文件并写入内容?" target="_blank">· 在java中如何创建一个文件并写入内容?</a><span class="text-muted pull-right">10-20</span></dd> <dd><a href="https://www.f2er.com/faq/884219.html" title="星号*在Python中是什么意思?" target="_blank">· 星号*在Python中是什么意思?</a><span class="text-muted pull-right">10-20</span></dd> <dd><a href="https://www.f2er.com/faq/884218.html" title="Flask框架:MVC模式" target="_blank">· Flask框架:MVC模式</a><span class="text-muted pull-right">10-20</span></dd> <dd><a href="https://www.f2er.com/faq/884217.html" title="在JavaScript对象数组中按ID查找对象" target="_blank">· 在JavaScript对象数组中按ID查找对象</a><span class="text-muted pull-right">10-20</span></dd> <dd><a href="https://www.f2er.com/faq/884216.html" title="使用Javascript / jQuery下载文件" target="_blank">· 使用Javascript / jQuery下载文件</a><span class="text-muted pull-right">10-20</span></dd> </dl> <dl class="col-sm-4 site-link"> <dt>好站推荐</dt><dd> <a href="https://www.runoob.com" title="菜鸟教程(www.runoob.com)提供了编程的基础技术教程, 介绍了HTML、CSS、Javascript、Python,Java,Ruby,C,PHP , MySQL等各种编程语言的基础知识。 同时本站中也提供了大量的在线实例,通过实例,您可以更好的学习编程。" target="_blank">菜鸟教程</a></dd><dd> <a href="https://www.jb51.cc" title="编程之家(www.jb51.cc)是成立于2017年面向全球中文开发者的技术内容分享平台。提供编程导航、编程问答、编程博文、编程百科、编程教程、编程工具、编程实例等开发者最需要的编程技术内容与开发工具支持,与你一起学习编程,相信编程改变未来!" target="_blank">编程之家</a></dd><dd> <a href="https://www.f2er.com" title="前端之家 f2er.com 前端开发人员所需学习知识手册。" target="_blank">前端之家</a></dd></dl> <dl class="col-sm-2 site-link"> <dt>商务合作</dt> <dd><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=76874919&site=qq&menu=yes">联系我们</a></dd> </dl> </div> <div class="copyright"> Copyright © 2019 前端之家. 当前版本 V7.0.16<br> <span class="ml5">前端之家 版权所有 <a href="https://beian.miit.gov.cn/" target="_blank" rel="nofollow">闽ICP备13020303号-10</a></span> </div> </div> </footer> <script type="text/javascript" src="https://www.f2er.com/js/base.js"></script> </body> </html>