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

? ??? ?? PHP ???? ?? ???? ????? ??? ???? ?? PHP?? ????? ???? ???

?? ???? ????? ??? ???? ?? PHP?? ????? ???? ???

Jul 25, 2016 am 09:12 AM

  1. class Fun{
  2. function isEmpty($val)
  3. {
  4. if (!is_string($val)) return false; //?????? ??
  5. if (empty($val)) return false; //?????? ??
  6. if ($val=='') return false ; //?? ??? ??
  7. return true
  8. }
  9. /*
  10. ----------------- --------- -------------
  11. ???: isNumber
  12. ?? ??: ??? ???? ??
  13. ??: string
  14. ??: boolean
  15. ?? ??: ------
  16. ----- ---------- -------------- ----------
  17. */
  18. ?? isNumber($val)
  19. {
  20. if(ereg("^[0-9] $", $val))
  21. true ??;
  22. false ??;
  23. }
  24. /*
  25. ------------------------ --- ------------------
  26. ??? : isPhone
  27. ??? ?? : isPhone?? ?????. ??? ?????
  28. ??: ???
  29. ??: ??
  30. ?? ??: ------
  31. ------ --------------- -----------
  32. */
  33. ???Phone( $val)
  34. {
  35. //?: xxx -xxxxxxxx-xxx | xxxx-xxxxxxx-xxx ...
  36. if(ereg("^((0d{2,3})-)(d {7,8})(-(d{3,}) )?$",$val))
  37. true ??;
  38. false ??;
  39. }
  40. /*
  41. -------------- ---------------------- -------------
  42. ?? ?? : isPostcode
  43. ??? ??: ??? ?????? ??
  44. ??: ???
  45. ??: ??
  46. ?? ??: ------
  47. --------- ------------------- ------------------
  48. */
  49. function isPostcode($val)
  50. {
  51. if(ereg("^[0-9] {4,6}$",$val))
  52. true ??;
  53. false ??;
  54. }
  55. /*
  56. ----------- -------- ---------------- -----
  57. ?? ??: isEmail
  58. ??? ??: ??? ?? ??? ??
  59. ??: ???
  60. ??: ??
  61. ?? ??: ------
  62. - ------------ ------------ ---------
  63. */
  64. ?? isEmail($val,$domain ="")
  65. {
  66. if(!$domain)
  67. {
  68. if ( preg_match("/^[a-z0-9-_.] @[da-z][.w -] .[a-z]{2,4}$/i", $val) )
  69. {
  70. return true;
  71. }
  72. else
  73. return false;
  74. }
  75. else
  76. {
  77. if( preg_match("/^[a-z0-9-_. ] @".$domain."$/i", $val) )
  78. {
  79. return true;
  80. }
  81. else
  82. return false;
  83. }
  84. }/ /end func
  85. /*
  86. ----------- ------------ ---------------
  87. ???: isName
  88. ??? ??: ??, ?? ??? ??, ???, ??? ?? ??
  89. ??: ???
  90. ??: ??
  91. ?? ??: -------
  92. - --------------- --------- --------
  93. */
  94. ?? isName($val)
  95. {
  96. if( preg_match("/^[x80-xffa-zA-Z0-9]{3, 60}$/", $val) )//2008-7-24
  97. {
  98. return true;
  99. }
  100. return false;
  101. }//end func
  102. /*
  103. ------------------- ---------------------- -----
  104. ?? ??: isStrLength($theelement , $min, $max)
  105. ??? ??: ??? ??? ????? ????? ??
  106. ??: ??(???, ?? ??, ?? ??)
  107. ??: ??
  108. ?? ??: -- ----
  109. --------------- --------------- ----------------------
  110. */
  111. ?? isStrLength($val, $min, $max)
  112. {
  113. $ theelement= Trim($val);
  114. if(ereg("^[a-zA-Z0-9]{" .$min.",".$max."}$",$val))
  115. true ??;
  116. false ??;
  117. }
  118. /*
  119. ---------------------- --------------- ---------
  120. ?? ??: isNumberLength($theelement, $min , $max)
  121. ??? ??: ??? ??? ?? ??? ????? ??
  122. ??: ??(???, ?? ??, ?? ??)
  123. ??: ??
  124. ?? ??:------ -
  125. ------------- ------- --------------
  126. */
  127. ?? isNumLength($val, $ min, $max)
  128. {
  129. $theelement= Trim($val);
  130. if(ereg("^[0-9]{".$min.",".$max."} $",$val))
  131. true ??;
  132. false ??;
  133. }
  134. /*
  135. --- --------------------- ----------------
  136. ?? ??: isNumberLength ($theelement, $min, $max)
  137. ?? ??: ??? ??? ?? ??? ????? ??
  138. ??: ??(???, ?? ??, ?? ??)
  139. ??: ??
  140. ?? ??:------
  141. ---- ----------------------- -------------- ----
  142. */
  143. ?? isEngLength($val, $min, $max)
  144. {
  145. $theelement=trimm($val);
  146. if(ereg("^[ a-zA-Z]{".$min.",".$max."}$",$val))
  147. true ??;
  148. false ??;
  149. }
  150. /*
  151. -------------------------- ------ -------
  152. ??? : isEnglish
  153. ??? ?? : ??? ???? ??
  154. ?? : string
  155. ??: ??
  156. ???: ------
  157. ?? ??: ------
  158. --- ---------- --------
  159. */
  160. function isEnglish($theelement)
  161. {
  162. if( ereg("[x80-xff].",$theelement) )
  163. {
  164. ?? false;
  165. }
  166. ?? true;
  167. }
  168. /*
  169. --------------------------------- ------------ -----
  170. ???: isChina
  171. ??? ??: ??? ???? ??
  172. ??: ???
  173. ??: ??
  174. ?? ??: ------
  175. ---------- ------------------------ --------
  176. */
  177. /*
  178. ?? is???($sInBuf)//??? ?? ??
  179. {
  180. $iLen= strlen($sInBuf);
  181. for($i= 0; $i< $iLen; $i )
  182. {
  183. if(ord($sInBuf{$i})>=0x80)
  184. {
  185. if( (ord($sInBuf{$i})>=0x81 && ord($sInBuf{$i})<=0xFE) && ((ord($sInBuf{ $i 1})>=0x40 && ord($sInBuf{$i 1}) < 0x7E) || (ord ($sInBuf{$i 1}) > 0x7E && ord($sInBuf{$i 1} )<=0xFE)) )
  186. {
  187. if(ord($sInBuf{$i})> 0xA0 && ord($sInBuf{$i})<0xAA)
  188. {
  189. //??? ??? ??
  190. return false;
  191. }
  192. }
  193. else
  194. {
  195. //??? ?? ?? ???
  196. return false;
  197. }
  198. $i ;
  199. }
  200. else
  201. {
  202. return false;
  203. }
  204. }
  205. return true;
  206. }*/
  207. function isChina($sInBuf)//??? ??
  208. {
  209. if (preg_match("/^[x7f-xff) ] $/", $sInBuf)) { //gb2312, utf-8? ??
  210. return true;
  211. }
  212. else
  213. {
  214. return false;
  215. }
  216. }
  217. /*
  218. ---------- ---------------------------- ---------
  219. ?? ??: isDomain($Domain)
  220. ??? ??: (??) ??? ??? ????? ??
  221. ??: ??? ??? ??
  222. ??: ??
  223. ?? ??: -------
  224. --------- -------------- -----------
  225. */
  226. ?? isDomain($ ???)
  227. {
  228. if(!eregi("^[0-9a-z] [0-9a -z.-] [0-9a-z] $", $Domain))
  229. {
  230. false ??;
  231. }
  232. if( !eregi(".", $Domain))
  233. {
  234. false ??;
  235. }
  236. if(eregi( "-.", $Domain) ?? eregi("--", $Domain) ?? eregi("..", $Domain) ?? eregi(".-", $Domain))
  237. {
  238. ?? false;
  239. }
  240. $aDomain= ??(".",$Domain);
  241. if( !eregi("[a-zA-Z]",$aDomain[count($aDomain) )-1]) )
  242. {
  243. false ??;
  244. }
  245. if (strlen($aDomain[0]) > 63 || strlen($aDomain[0]) < ; 1)
  246. {
  247. false ??;
  248. }
  249. true ??;
  250. }
  251. /**
  252. * ?? ?? ??
  253. * @paramknown_type $date
  254. * @paramknown_type $format
  255. * @throws Exception
  256. * @return boolean
  257. */
  258. ?? verifyDate( $date, $format= 'YYYY-MM-DD')
  259. {
  260. ???( $format )
  261. {
  262. ??? 'YYYY/MM/DD':
  263. ??? 'YYYY-MM-DD':
  264. list( $y, $m, $d ) = preg_split( '/[-./ ]/', $date );
  265. break;
  266. case 'YYYY/DD/MM':
  267. ?? 'YYYY-DD-MM':
  268. list( $y, $d, $m ) = preg_split ( '/[-./ ]/', $date );
  269. break;
  270. ??? 'DD-MM-YYYY':
  271. ??? 'DD/MM/YYYY':
  272. list( $d, $m, $y ) = preg_split( '/[-./ ]/' , $date );
  273. break;
  274. case 'MM-DD-YYYY':
  275. case 'MM/DD/YYYY':
  276. list( $m, $d, $y ) = preg_split( '/[-./ ]/', $date );
  277. break;
  278. case 'YYYYMMDD':
  279. $y = substr( $date, 0, 4 );
  280. $m = substr( $date, 4, 2 );
  281. $d = substr( $date, 6, 2 );
  282. break;
  283. ??? 'YYYYDDMM':
  284. $y = substr( $date, 0, 4 );
  285. $d = substr( $date, 4, 2 );
  286. $m = substr( $date, 6, 2 );
  287. break ;
  288. ???:
  289. throw new Exception( "??? ?? ??" );
  290. }
  291. return checkdate( $m, $d, $y );
  292. }
  293. /*
  294. --- ----------------------- --------------
  295. ?? ??: isDate
  296. ??? ??: ??? 0000-00-00? ????? ?????.
  297. ??: ???
  298. ??: ??
  299. ?? ??: ------
  300. -------- --------------- ---------------------- -
  301. */
  302. ?? isDate($sDate)
  303. {
  304. if( ereg("^[0-9]{4}-[][0-9]{2}-[0 -9]{2}$",$sDate) )
  305. {
  306. true ??;
  307. }
  308. else
  309. {
  310. false ??;
  311. }
  312. }
  313. /*
  314. ----------------------------------------------- --------------------
  315. ?? ?? : istime
  316. ??? ?? : ??? ????? 0000-00-00 00:00:00:00
  317. ?? : ??? ?? : boolean
  318. ?? ?? : ------
  319. -------------------------- ----------------------------------------------
  320. */
  321. ?? ISTIME ($ stime)
  322. {
  323. if (ereg ( "^[0-9] {4}-[] [0-9] {2}-[0-9] {2} [0-9] {2} : [0-9] {2} : [0-9] {2} $ ", $ stime))) return true;
  324. } {
  325. return false; }
  326. }
  327. /* ---------------------------------------------------------- ----- ------------------------------
  328. ?? ?? : IsMoney ($ val)
  329. ??? ?? : ?? : ?? ?? ??? ? RMB ?? ?? : ??? ?? : boolean ?? ?? : ------
  330. ------------- ----------- ----------------------------------
  331. */ function ismoney ($ val)
  332. { if (ereg ( "^[0-9] {1,} $", $ val))
  333. return true; /* ------------------------------------------ ---------- -------
  334. ?? ?? : ISIP ($ val)
  335. ??? ?? : ?? IP? ?? ??? ????? ??
  336. ?? : String
  337. ?? : ?? ?? ?? : ----
  338. ---------------------------------- -------------- ----------------------------
  339. */
  340. ?? ISIP ($ val) return (bool) ip2long ($ val);
  341. }
  342. // ----------------------------------------- ------------------ --------------------------------
  343. /** * ??? ?? ??
  344. * @param int $mobile
  345. /
  346. function valid_mobile ($ mobile) { if (strlen ($ mobile)! = 11) false; if (preg_match ( '/13 [0-9] d {8} | 15 [0 | 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9] d {8} | 18 [0 | 5 | 6 | 7 | 8 | 9] d {8}/', $ mobile))) {
  347. return true;
  348. } else {
  349. return false;
  350. }
  351. }
  352. /**
  353. * ??? ?? ??? GD2? ???? ?? ?? ????
  354. *
  355. * @param string $srcFile ???? ??? ??
  356. * @param int $toW Thumbnail width
  357. * @param int $toH ??? ??
  358. * @param string $toFile ??? ??
  359. */
  360. ?? imagizeize ($ srcfile, $ tow, $ toh, $ tofile = "") {
  361. if ($ tofile == "") {$ tofile = $ srcfile; $ info = ""; switch ($ data [2]) { case 1 :
  362. if (! function_exists "imageCreateFromgif")) { // echo "GD ?????? GIF ??? ???? ???? ? ? ???? JPEG ?? PNG ??? ??????! & lt; a href = 'javaScript : go (-1);'& gt; return & lt;/a & gt; ";
  363. return false;
  364. }
  365. $ im = imageCreateFromGif ($ srcfile); break ; CASE 2 :
  366. if (! function_exists ( "imageCreatefromjpeg")) { // echo "GD ?????? jpeg ???? ???? ??? ? ???? ?? ??? ???? ??????!"& lt; a href = 'javaScript : go (-1);'& gt; default & lt;/a & gt; ";
  367. return false;
  368. }
  369. $ im = imageCreatefromjpeg ($ srcfile); break $ im = imagecreateflestfompng ($ srcfile); = $ ftow*($ srch/$ srcw);
  370. } $ ftoh = $ toh; $toH)
  371. {
  372. if(function_exists("createimageTrueColor")){
  373. @$ni = ImageCreateTrueColor($ ftoW , $ftoH ) > $ni=ImageCreate($ftoW,$ftoH);
  374. imagecopyresized ($ ni, $ im, 0,0,0,0, $ ftow, $ ftoh, $ srcw, $ srch) else {
  375. $ ni = imageCreate ($ ftow, $ ftoh); ;);); }
  376. if (function_exists ( 'ImageJpeg')) imageJpeg ($ ni, $ tofile); else imagepng ($ ni, $ tofile);
  377. imageStroy ($ ni); } else {
  378. imageStroy ($ im);
  379. return false; }
  380. imageStroy ($ im);
  381. ?? true;
  382. / / ?? >
  383. ?? ?? strTrim ( $str )
  384. {
  385. return preg_replace ( " / s / " " ", $str ); ??> // ???? ?? ?? ?? ??? ?? ($ str, $ type, $ len) if ($ len & lt; strlen ($ str))) {
  386. > return false; } else { switch ($ type) { case "en"> if (preg_match ( " / ^ [a -za -z] $ / ", $ str))
  387. {
  388. return true;
  389. } else {
  390. > return false;
  391. } break;
  392. case"5 "http : // enclosure
  393. if (preg_match (" / ^ [a -za -z0-9] $ / ", $ str)) return true; (" / ^ [| - - - - [ / ^ [| - _a-za-z0-9] $/", $ str)))
  394. {
  395. return true;
  396. } else {
  397. return false;
  398. } break; $ str = self :: strtrim ($ str); ??> $ str = self :: strtrim ($ str);
  399. if (preg_match ( "/^([a-z0-9_]] | \-| \.) @([a-z0- 9_] | \-) \.) {1,2} [a-z] {2,4} $/i ", $ str)) {
  400. return true;
  401. } else { return false;
  402. } ?? ?? idcard ($ str) {
  403. $ str = self :: strtrim ($ str);
  404. if (preg_match ( "/^([0-9] {15-9]] {17} [0-9a-z]) $/i", $ str )) {
  405. } else {
  406. {
  407. $ strm :: strtrim; } | 0 [0-9] {3})-[0-9] {7.8} $/", $ str)) {
  408. return true;
  409. } else {
  410. ?? Return false ;
  411. }
  412. break;
  413. case "int": if (preg_match ( "/^[0-9] {4}-([0-9] {3} | 0 [0 -9] {3})-[0-9] {7.8} $/", $ str))) return true; } else {
  414. return false; }
  415. break;
  416. }
  417. } * 2 ?? ??? ?
  418. * @param 2 ?? ?? $ ARR_DATA
  419. * @param 1 ?? ?? $ field * /
  420. getArrayfield ($ arr_data, $ field); ; $ value) { foreach ($ field as $ k = & gt; $ v) {
  421. if (array_key_exists ($ v, $ value)) // ??? ?
  422. {
  423. $ resultarr [$ key] [$ v] = $ value [$ v]; $ resultarr [$ v] = "???? ????"; ??>} }
  424. }
  425. return $ resultarr;
  426. /**
  427. * ????? IP ?? ????
  428. * @return ip
  429. */
  430. ?? get_client_ip(){
  431. if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown"))
  432. $ip = getenv("HTTP_CLIENT_IP");
  433. else if (getenv("HTTP_X_FORWARDED_FOR") && strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "? ? ??"))
  434. $ip = getenv("HTTP_X_FORWARDED_FOR");
  435. else if (getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"), "? ? ??"))
  436. $ip = getenv("REMOTE_ADDR");
  437. else if (isset($_SERVER[' REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], "? ? ??"))
  438. $ip = $_SERVER['REMOTE_ADDR'];
  439. else
  440. $ ip = "? ? ??";
  441. return($ip);
  442. }
  443. function get_http_user_agent(){
  444. return isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";
  445. }
  446. /**
  447. * IP ???? ?? ?? ????
  448. * @param IP $ip
  449. */
  450. ?? get_address_from_ip($ip){
  451. $url='http:// www.youdao.com/smartresult-xml/search.s?type=ip&q=';
  452. $xml=file_get_contents($url.$ip);
  453. $data=simplexml_load_string($xml);
  454. $data->??->??;
  455. } ??
  456. /**
  457. * ???? ????? ???? ? ??? ? ?? ??? ???? ?????. ?? ??? 6?? ??? ?? ??
  458. * @param string $len length
  459. * @param string $type string type
  460. * ?? 0? ?? 1? ??? 2? ??? 3? ?? ?? 4 ???
  461. * @param string $addChars ?? ??
  462. * @return string
  463. */
  464. function rand_string($len=6,$type='',$addChars='') {
  465. $str ='';
  466. ???($type) {
  467. ?? 0:
  468. $chars='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.$addChars;
  469. break;
  470. ?? 1:
  471. $chars= str_repeat('0123456789' ,3);
  472. ??;
  473. ?? 2:
  474. $chars='ABCDEFGHIJKLMNOPQRSTUVWXYZ'.$addChars;
  475. ??;
  476. ?? 3:
  477. $chars='abcdefghijklmnopqrstuvwxyz'.$ addChars;
  478. break;
  479. ?? 4:
  480. $chars = "??? ? ? ?? ?? ??? ????? ?? ??? ??? ?? ? ?? ??? ??? ?? ???? ?? ???? ?? ? ??? ?????. ?? ???? ?? ?? ?? ???? ?? ????? ???? ???? ?, ??? ?? ??, ?? ??, ??? ?, ?? ?? ??? ??, ??? ??? ?? ? ?? ??, ? ?? ?, ??? ? ?? ??? ?? ???, ???? ??? ???? ? ?? ???? ?? ???? ?? ??? ?? ??? ??? ????. ??? ?? ??? ??? ????, ??, ??? ??, ???, ???, ??? ???? ?? ??? ?? ??? ? ?? ?? ????? ???? ?????. ??? ??, ??, ??? ?? ??? ??? ???? ?? ????? ??? ??? ?? ?? ?? ??? ?? ???? ?? ?????. 4??? ????? ?????? ?? ????? ???? ?? ????? ?? ??? ??? ?? ?? ?? ?? ?? ??? ???? ??? ??. Shiqiang? Tu Shaoji? ????? ??? ???? ????? Jiuyou? Xizhi? Zhiguan, Qimoshan, Cheng Baibao? ????? ?????? ???? ???? ?? ?? ???? ?? ?? ??? ??? ?? ? ????. ??, ??, ?? ?, 6?? ?? ? ?? ?? ?? ???? ??? ?? ? Laolunk? Nanguang?? ??? ?? ??? ?? ??? ??????. ?? ??? ???? ??? ???? ???? ???? ???????. Rashidal Field Weaving Calendar Flower?? ?? ??, ??? ??, ??? ??. ?? ??, ?? ?? ?? ??, ??? ???? ???? ?? ??? ??? ???? ?? 8?? ??? ??? ?????. ??? ??? ???? ?? ?? ??, ??? ???? ??? ? ????. ? Jibai ??? ?? ?? ? ? ?? ???, ??? ?? ??, ?? ?? ??, Xu ?? ??, ?? ?? ?? ???, ?? ??, Hecun ??, ??, Yamo ?? ?? ??, ??? ?, ???? ??, Huang ??, ???? ??? ??? ?????? ?? ???. ??? ???? ?? ?? ??? ??? ?? ?? ???? ??? ?????? ??? ?? ??? ???? Xuanhuan Luoshou Chibo Chengfenjianfu ??? ??? ??? ?? ???? ?? ????? ????? ???? ?? ??? ?? ??? ?????. ?? ?? ?? ???? Qu Chunyuan ?? ???? ?? ?? ?? Taimo ?? ?? Yangjiang ?? Mu Mu Yan Qi Chao Medical School Gu Ni Dao Song Ting Wei Shu Hua ? ? ?? Wei Zi Gu Gang? Liu Wei Lue Fan Gong A Kuai? ?? ??? ????. ??? ??? ?? ??? ?? ??? ??? ?????. Guyuan? Chupi? ??? ?? ? ??? ?? Weiji ?? ? ??? ??? ???? ??? ?????. Late Silk Girl Disperse Welding Gongzhu Yin Leng Che Bounce Disperse Business Visual Art Destroy Edition Lie Zero Room Light Blood Double Deficiency Pump Cha Jue Fu City Chong ???? ?? Jian Fuzhu Li Wangpan Magi Xiong? ?? ? ????. Gong Yizhou? ???? ?? ?? ??? ?????. ??? ?? ??? ?? ??? ???? ?????. ?? ??? ?? ???? ?????. ?? ?? ?? ?? ?? ??????. ??? ?? ??? ???? ??? ??? Luo Ni Pi Sui ?? ?? ? ?? ?? ?? ?? ???? ?? ?? ? Meng Qian ??? ???? ????. ?? ?? ?? ? ?? ?? ?? ?? ?? ?? ?? ??? ?? ?? ?? ??? ? ??? ? ?? ??? ?? ??? ??? ?? ?? ?? ??, ??, ??, ??, ? ??, ???? ??????. ??, ??, ??, ?? ??, ? ?? ???, ???, ??, ???? ?? ??? ?, ?? ??, ???? ??, ???, ?? ?? ???, ?, ?? ?? ???, ???? ???? ?????. ?? ??? ???? ?? ????? ??????. ?? ??? ????. ??? ??, ?? ??, ??????. ?? ? ?? Lan Yinggou B? ?? ??, ?? ?? ??, Yongwa, ?? ??, ?? Xianshun, ??, ?? ??, ??? ??????. ??? ??? ??, ?? ??? ??? ?? ? , ??? ????, ??? ??, ?? ????, ??? ????, ??? ?? ????, ???? ?? ??? ???? ??? ?? ????, ???. ??? ????? ??? ???? ??? ?? ??? ??? ??? ??? ???? ?? ??? ??? ???? ???? ?? ??? ???? ??? ??? ??? ???? ??? ?? ??? ????, ??? ????, ????, ????? ?????, ?? ???, ??? ??, ??? ??? ?????, ??? ???, ?? ????, ?? ?? ??? ????? ??. ?? ??? ?? ??? ?? ? ??? ???, ?? ????, ??? ????, ??? ?????, ?? ????, ???? ??? ???, ??? ??? ???, ??? ????. ??? ?? ??? ?? ??? ???? ??? ??? ?? ??? ????? ??? ???? ???? ??? ???? ???? ???? ??? ???? ??? ? ??? ???? ??? ???, ???? ???? ??? ???, ??? ??, ??? ??? ??? ?? ??? ??, ??? ??? ?? ??? ?? ????, ???, ????? ??? ???? ??? ?? ?? ?? ???? ??? ??? ?? ??? ?? ?? Yi Jingtan Lei Jun ?? Du Lele? ??? ???? Zhao Shao Hu Hu Tong Feng Ling Chai Huang Wu? Shang Ding Qin Shao Zhui Liang?? ?? ?????. ??? ?? ?? ?? ?? ??? ?? He He Che Heng Qin ??? ?? ??? ??? ?? ?? ?? ?? ?? ? ?? ?? ?? Hu Luo Fu Bo League ?? Yang Zong Jiao Sai ?? ?? ??? ?? ?? ?? ?? ?? ??? ?? ? ? ?? ?? ??? ?? ?? ?? ?? ?? ?? ?? ? ?? ? ? ?? ?? ? ? Jianzun Douba Mo ??? ?? ??? ?? ??? ?? ???? ? ?? ? ???? ?? ?? ?? ?? ?? ? ?? ??? ? ?? Kunlang Sa ?? Lun Niang ?? ?? ?? ?? ??? ???? ?? ??? ?? ????. ?? ??? ??? ??? ?? ???? ??, ???? ??, ?? ?, ??? ??, ??? ??, ???? ??, Qiao Tang? ??? ??????. ???? ?? ??? ??, ???? ?? ???? ??? ????, ??? ?????, ???? ???? ????, ???, ???, ??, ??, ???, ???, ???? ????? ??????. ??, ? ??, ?? ???, ?? ??, ??? ???, ??, ??, ??, ??? ??, ?? ?? ???, ???? ??, ??? ??, ?? ??, ???, ?? ?, ??, ??, ?? ?? Sun Linling? ??? ??????. ".$addChars;
  481. break;
  482. ?? 5:
  483. $chars='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.$addChars;
  484. break;
  485. ???:
  486. // The ???? ?? ?? oOLl ? ?? 01? ????? ?????. ????? addChars ????
  487. $chars='ABCDEFGHIJKMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz23456789'.$addChars;
  488. break;
  489. }? ?????.
  490. if($len>10 ) {//???? ?? ??? ???? ?? ?? ?????.
  491. $chars= $type==1? str_repeat($chars,$len) : str_repeat($chars,5) ;
  492. }
  493. if($type == 4){ // ??? ??
  494. $chars = preg_replace('/[^\x{4e00}- \x{9fa5}]/u ', '', $chars); // //utf8? ?? ??? ?????.
  495. $chars = Chunk_split($chars,3,",") // / /3??? ","? ???? ??? ???? ?????. strlen()? ???? PHP?? ??? 3?? ????? ?????.
  496. $re =explore(",",$chars);
  497. shuffle($re);//??? ???? ???
  498. $chars = implode($re);
  499. unset($re);
  500. $str = mb_substr($chars,0,$len," utf-8");
  501. }else {
  502. $chars = str_shuffle($chars);
  503. $str = substr($chars,0,$len);
  504. }
  505. return $str;
  506. }
  507. //url?? ???? ? ????
  508. ?? geturlval($url,$name)
  509. {
  510. $arr = parse_url( $url);
  511. $arr_query = $this-> ;convertUrlQuery($arr['query']);
  512. return $arr_query[$name];
  513. }
  514. function ConvertUrlQuery($query)
  515. {
  516. $ queryParts =Explode('&', $query);
  517. $params = array();
  518. foreach($queryParts? $param??)
  519. {
  520. $item = ??('= ', $param);
  521. $params[$item[0]] = $item[1];
  522. }
  523. ?? $params;
  524. }
  525. /**
  526. * ?? ??? ????
  527. *
  528. * @param string $url ?? ??? ??
  529. * @param string $filename ?? ??? ?? ??
  530. */
  531. function GrabImage($url, $savepath) {
  532. if($url =="") {
  533. return false; //$url? ?? ??? false? ?????.
  534. }
  535. $ext_name = strrchr($url, '.') //??? ???? ?????.
  536. if($ext_name != '. gif' && $ext_name != '.jpg' && $ext_name != '.bmp' && $ext_name != '.png') {
  537. return false //??? ???? ??? ??????.
  538. }
  539. //?? ?? ?? ????
  540. $filename = $savepath .'\'.end(explode('/',$url));
  541. //?? ??
  542. ob_start() ;
  543. readfile($url);
  544. $img_data = ob_get_contents() ;
  545. ob_end_clean();
  546. $size = strlen($img_data);
  547. $local_file = fopen($filename , 'a');
  548. echo $filename;
  549. if(fwrite( $local_file, $img_data)== FALSE){
  550. echo '??? ???? ??';
  551. }
  552. fclose($ local_file);
  553. return $filename;
  554. }
  555. }
  556. ?>
?? ??



? ????? ??
? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? 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 18, 2025 am 04:51 AM

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

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

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

?? 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