国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

? ??? ?? PHP ???? PDO ?????? ?? ???

PDO ?????? ?? ???

Jul 25, 2016 am 08:44 AM

  1. class HRDB{
  2. protected $pdo;
  3. protected $res;
  4. protected $config;
  5. /*???* /
  6. function __construct($config){
  7. $this->Config = $config;
  8. $this->connect();
  9. }
  10. /*?????? ?? * /
  11. ?? ?? connect(){
  12. $this->pdo = new PDO($this->Config['dsn'], $this->Config['name'], $this - >Config['password']);
  13. $this->pdo->query('set names utf8;');
  14. //??? stdClass? ???
  15. //$this - >pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);
  16. //??? ???? ??? ?? ?????
  17. $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO ::ERRMODE_EXCEPTION);
  18. }
  19. /*?????? ??*/
  20. ?? ?? close(){
  21. $this->pdo = null;
  22. }
  23. ?? ?? ??($sql){
  24. $res = $this->pdo->query($sql);
  25. if($res){
  26. $this->res = $res;
  27. }
  28. }
  29. ?? ?? exec($sql){
  30. $res = $this->pdo->exec($sql);
  31. if($ res ){
  32. $this->res = $res;
  33. }
  34. }
  35. ?? ?? fetchAll(){
  36. return $this->res->fetchAll();
  37. }
  38. ?? ?? fetch(){
  39. return $this->res->fetch();
  40. }
  41. public function fetchColumn(){
  42. return $this- > ;res->fetchColumn();
  43. }
  44. ?? ?? lastInsertId(){
  45. return $this->res->lastInsertId();
  46. }
  47. / **
  48. * ???? ??
  49. * int $debug ??? ??? ??, ????? sql ?? ?????.
  50. * 0 ????
  51. * 1 ???
  52. * 2 ??? ??? ? ?? ????
  53. * int $ ?? ?? ??
  54. * 0? ?? ???? ?????.
  55. * 1? ?? ???? ?????.
  56. * 2 ? ?? ?????.
  57. * ???/?? $table ?????? ???, two ? ?? ??
  58. * ?? ??:
  59. * 'tb_member, tb_money'
  60. * ?? ??:
  61. * array('tb_member', 'tb_money')
  62. * ???/?? $fields ??? ?????? ??, ??? ? ??, ???? ?? ??, ? ?? ? ?? ??
  63. * ?? ??:
  64. * '??? ??, ????'
  65. * ?? ??:
  66. * array('username', 'password')
  67. * ???/?? $sqlwhere ?? ??, ?? ?? ??, ? ?? ? ?? ??
  68. * ?? ??:
  69. * 'and type = 1 ? ??? ?? like " %os%"'
  70. * ?? ?? :
  71. * array('type = 1', 'username like "%os%"')
  72. * string $orderby ??, ???? id ??
  73. */
  74. ?? ?? ??($debug, $mode, $table, $fields="*", $sqlwhere="", $orderby="tbid desc"){
  75. / / ???? ??
  76. if(is_array($table)){
  77. $table = implode(', ', $table);
  78. }
  79. if(is_array($fields)){
  80. $ fields = implode(', ', $fields);
  81. }
  82. if(is_array($sqlwhere)){
  83. $sqlwhere = ' and '.implode(' and ', $sqlwhere);
  84. }
  85. //?????? ??
  86. if($debug === 0){
  87. if($mode === 2){
  88. $this->query("select count( tbid ) from $table where 1=1 $sqlwhere");
  89. $return = $this->fetchColumn();
  90. }else if($mode === 1){
  91. $this- > ;query("select $fields from $table where 1=1 $sqlwhere order by $orderby");
  92. $return = $this->fetch();
  93. }else{
  94. $this - >query("select $fields from $table where 1=1 $sqlwhere order by $orderby");
  95. $return = $this->fetchAll();
  96. }
  97. return $return ;
  98. }else{
  99. if($mode === 2){
  100. echo "$table?? ??(tbid) ??, ??? 1=1 $sqlwhere";
  101. }else if($mode = == 1){
  102. echo "$table?? $fields ??, ??? 1=1 $sqlwhere order by $orderby";
  103. }
  104. else{
  105. echo "1=1? $sql?? $orderby? ??? $table?? $fields ??";
  106. }
  107. if($debug === 2){
  108. exit;
  109. }
  110. }
  111. }
  112. /**
  113. * ???? ??
  114. * int $debug ??? ??? ??, ????? sql ?? ?????.
  115. * 0 ????
  116. * 1 ???
  117. * 2 ??? ??? ? ?? ????
  118. * int $ ?? ?? ??
  119. * 0 ?? ?? ??
  120. * 1 ?? ?? ?? ??
  121. * 2 ????? ??? ???? ID? ??
  122. * ???/?? $ ??? ?????? ???, ? ?? ? ?? ??
  123. * ?? ??:
  124. * 'tb_member, tb_money'
  125. * ?? ??:
  126. * array('tb_member', 'tb_money')
  127. * string/array $set ??? ???? Content, ? ?? ? ?? ??
  128. * ?? ??:
  129. * 'username = "test", type = 1, dt = now()'
  130. * Array ??:
  131. * array('username = "test"', 'type = 1', 'dt = now()')
  132. */
  133. ?? ?? ??($debug, $mode, $table, $set){
  134. / /參數(shù)處理
  135. if(is_array($table)){
  136. $table = implode(', ', $table);
  137. }
  138. if(is_array($set)){
  139. $set = implode(', ', $set);
  140. }
  141. //數(shù)據(jù)庫操?
  142. if($debug === 0){
  143. if($mode === 2){
  144. $this->query("$table set $set? ??");
  145. $return = $this->lastInsertId();
  146. }else if($mode === 1) {
  147. $this->exec("$table set $set? ??");
  148. $return = $this->res;
  149. }else{
  150. $this->query ("$table set $set? ??");
  151. $return = NULL;
  152. }
  153. return $return;
  154. }else{
  155. echo "$table set $set? ??" ;
  156. if($debug === 2){
  157. ??;
  158. }
  159. }
  160. }
  161. /**
  162. * ???? ??
  163. * int $debug ??? ??? ??, ????? sql ?? ?????.
  164. * 0 ????
  165. * 1 ???
  166. * 2 ??? ??? ? ?? program
  167. * int $ ?? ?? ??
  168. * 0 ?? ?? ??
  169. * 1 ?? ?? ? ??
  170. * ??? $table ?????? ???, ? ?? ? ?? ??
  171. * ?? ??:
  172. * 'tb_member, tb_money'
  173. * ?? ??:
  174. * array('tb_member', 'tb_money')
  175. * string/array $set ????? ??? ?? ? ??, ? 2? -?? ??
  176. * ?? ??:
  177. * 'username = "test", type = 1, dt = now()'
  178. * ?? ??:
  179. * array('username = "test" ', 'type = 1', 'dt = now()')
  180. * ???/?? $sqlwhere ?? ??, ?? ??, ? ?? ? ?? ?? ??
  181. * ?? ??:
  182. * 'and type = 1 ? ??? ?? like "%os% "'
  183. * ?? ??:
  184. * array('type = 1', 'username like "%os%"')
  185. */
  186. ?? ?? update($debug, $mode, $table, $set, $sqlwhere=""){
  187. //參數(shù)處理
  188. if(is_array($table)){
  189. $table = implode(', ', $table);
  190. }
  191. if(is_array($set)){
  192. $set = implode(', ', $set);
  193. }
  194. if(is_array($ sqlwhere)){
  195. $sqlwhere = ' and '.implode(' and ', $sqlwhere);
  196. }
  197. //數(shù)據(jù)庫操?
  198. if($debug === 0){
  199. if($mode === 1){
  200. $this->exec("update $table set $set where 1=1 $sqlwhere");
  201. $return = $this->res;
  202. }else{
  203. $this->query("update $table set $set where 1=1 $sqlwhere");
  204. $return = NULL;
  205. }
  206. return $return ;
  207. }else{
  208. echo "$table set $set ????, ??? 1=1 $sqlwhere";
  209. if($debug === 2){
  210. exit;
  211. }
  212. }
  213. }
  214. /**
  215. * ???? ??
  216. * int $debug ??? ??? ??, ????? sql ?? ?????.
  217. * 0 ????
  218. * 1 ???
  219. * 2 ??? ??? ? ?? program
  220. * int $ mode return type
  221. * 0 ?? ?? ??
  222. * 1 ?? ?? ?? ??
  223. * string $table ?????? ???
  224. * string/array $sqlwhere ?? ??, ?? ?? ???? ? ?? ? ?? ??
  225. * ?? ??:
  226. * 'and type = 1 ? ??? ??? "%os%"''
  227. * ?? ??:
  228. * array('type = 1', '??? ??? "%os %"? ????')
  229. */
  230. ?? ?? delete($debug, $mode, $table, $sqlwhere=""){
  231. //參數(shù)處理
  232. if( is_array($sqlwhere)){
  233. $sqlwhere = ' and '.implode(' and ', $sqlwhere);
  234. }
  235. //數(shù)據(jù)庫操?
  236. if($debug === 0) {
  237. if($mode === 1){
  238. $this->exec("1=1 $sqlwhere? $table?? ??");
  239. $return = $this->res ;
  240. }else{
  241. $this->query("1=1 $sqlwhere? $table?? ??");
  242. $return = NULL;
  243. }
  244. return $return;
  245. }else{
  246. echo "1=1? $sqlwhere?? ??";
  247. if($debug === 2){
  248. exit;
  249. }
  250. }
  251. }
  252. }
復代碼

PDO


? ????? ??
? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? admin@php.cn?? ?????.

? AI ??

Undresser.AI Undress

Undresser.AI Undress

???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover

AI Clothes Remover

???? ?? ???? ??? AI ?????.

Video Face Swap

Video Face Swap

??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

???

??? ??

???++7.3.1

???++7.3.1

???? ?? ?? ?? ???

SublimeText3 ??? ??

SublimeText3 ??? ??

??? ??, ???? ?? ????.

???? 13.0.1 ???

???? 13.0.1 ???

??? PHP ?? ?? ??

???? CS6

???? CS6

??? ? ?? ??

SublimeText3 Mac ??

SublimeText3 Mac ??

? ??? ?? ?? ?????(SublimeText3)

???

??? ??

??? ????
1601
29
PHP ????
1502
276
???
PHP ?? ??? ??????? PHP ?? ??? ??????? Jul 17, 2025 am 04:16 AM

PHP ?? ??? ?? ???? ?? ? ????? ??? ?????. 1. ?? ??? ??? ??? ??? ? ? ??? ??? ??? ?? ?? ??? ???? ???????. 2. ?? ??? ???? ???? ? ?? ????? ?? ?? ?? ??? ?????. 3. $ _get ? $ _post? ?? Hyperglobal ??? ?? ???? ?? ??? ? ??? ??? ??????? ???????. 4. ?? ?? ?? ???? ?? ?? ?? ??? ?????? ?? ??? ??? ?? ??? ???????. ??? ??? ????? ??? ??? ?? ???? ????? ? ??? ? ? ????.

PHP?? ?? ???? ???? ???? ??? ?????? PHP?? ?? ???? ???? ???? ??? ?????? Jul 08, 2025 am 02:37 AM

PHP ?? ???? ???? ????? ?? ? ??? ???? ?? ?? ? ??? ???? ?? ??? ?????? ??? ??? ? ? ???????. 1. ??? ?? CSRF? ???? ?? ??? ??? ???? ?????? ??? ???? FINFO_FILE? ?? ?? MIME ??? ?????. 2. ??? ??? ??? ???? ??? ?? ??? ?? ? WEB ????? ??? ???? ??????. 3. PHP ?? ??? ?? ? ?? ???? NGINX/APACHE? ??? ????? ?? ???? ?????. 4. GD ?????? ??? ? ?? ???? ??? ?? ??? ?? ????.

PHP?? ?? ?? PHP?? ?? ?? Jul 18, 2025 am 04:57 AM

PHP ?? ???? ? ?? ???? ??? ????. 1. // ?? #? ???? ? ?? ??? ???? // ???? ?? ????. 2. ?? /.../ ?? ?? ?? ??? ????? ?? ? ?? ??? ?? ? ? ????. 3. ?? ?? ?? / if () {} /? ?? ?? ??? ????? ??? ?? ?? ?? ??? ???? ????? ???? ??? ?? ???? ???? ??? ? ??? ??????.

PHP?? ???? ??? ?????? PHP?? ???? ??? ?????? Jul 11, 2025 am 03:12 AM

Ageneratorinphpisamemory- ???? Way-Erate-Overgedatasetsetsbaluesoneatimeatimeatimeatimallatonce.1.generatorsuseTheyieldKeywordTocroadtOpvaluesondemand, RetingMemoryUsage.2

PHP ?? ?? ? PHP ?? ?? ? Jul 18, 2025 am 04:51 AM

PHP ??? ???? ??? ??? ??? ????? ????. ??? ????? ?? ???? ??? "?? ? ?"??? "?"? ???????. 1. ??? ? ??? ??? DocBlock (/*/)? ?? ?? ??? ???? ??? ? ?? ???? ??????. 2. JS ??? ???? ?? ???? ??? ?? ??? ??? ?????. 3. ??? ?? ?? ?? ??? ???? ????? ????? ???? ?? ????? ???? ? ??????. 4. Todo ? Fixme? ????? ???? ? ? ??? ??? ???? ?? ?? ? ??? ???????. ??? ???? ?? ??? ??? ?? ?? ?? ???? ???? ? ????.

?? PHP : ??? ??? ?? PHP : ??? ??? Jul 18, 2025 am 04:54 AM

tolearnpheffectical, startBysetTupaloCalserErverEnmentUsingToolslikexamppandacodeeditor -likevscode.1) installxamppforapache, mysql, andphp.2) useacodeeditorforsyntaxsupport.3)) 3) testimplephpfile.next, withpluclucincludechlucincluclucludechluclucled

PHP?? ??? ? ???? ??? ????? ?? PHP?? ??? ? ???? ??? ????? ?? Jul 12, 2025 am 03:15 AM

PHP??? ???? ??? ?? ?? ????? ???? ??? ?? ??? ??? ?? ? ??? ??? ???? ?????. ???? 0?? ???? ?? ??? ???? ? ?? ???? ?? ?? ? ? ????. MB_SUBSTR? ?? ??? ??? ???????. ? : $ str = "hello"; echo $ str [0]; ?? H; ??? MB_SUBSTR ($ str, 1,1)? ?? ??? ??? ??? ??????. ?? ???????? ???? ??? ???? ?? ???? ?? ?? ???? ?????? ??? ????? ?? ??? ?? ??? ???? ???? ?? ????.

?? PHP ?? ??? ?? PHP ?? ??? Jul 18, 2025 am 04:52 AM

toinstallphpquickly, usexampponwindowsorhomebrewonmacos.1. ??, downloadandinstallxAmpp, selectComponents, startApache ? placefilesinhtdocs.2

See all articles