av激情亚洲男人的天堂国语,日韩欧美精品一中文字幕,无码av一区二区三区无码,国产又色又爽又刺激的a片,国产又色又爽又刺激的a片

PHP hack的使用技巧詳解

PHP hack的使用方法是一個(gè)比較麻煩的過程。我們在這里給出的代碼示例,希望能夠作為大家在開發(fā)中的參考學(xué)習(xí)對象。這次講的是使用PHP hack實(shí)現(xiàn)類似TAB VIEW的效果哦,的確麻煩些。#t#

PHP hack示例:

  1. < ?php  
  2. $tabs = array();  
  3. function tabs_header()  
  4. {  
  5. ?> 
  6.  type="text/css"> 
  7. .tab {  
  8. border-bottom: 1px solid black;  
  9. text-align: center;  
  10. font-family: arial, verdana;  
  11. }  
  12. .tab-active {   
  13. border-left: 1px solid black;   
  14. border-top: 1px solid black;   
  15. border-right: 1px solid black;   
  16. text-align: center;   
  17. font-family: arial, verdana;   
  18. font-weight: bold;  
  19. }  
  20. .tab-content {   
  21. padding: 5px;   
  22. border-left: 1px solid black;   
  23. border-right: 1px solid black;   
  24. border-bottom: 1px solid black;  
  25. }   
  26. < /style>  

 
 
 
  1. }  
  2. function tabs_start()  
  3. {   
  4. ob_start();   
  5. }  
  6. function endtab()   
  7. {   
  8. global $tabs;  
  9. $text = ob_get_clean();  
  10. $tabs[ count( $tabs ) - 1 ][ 'text' ] = $text;  
  11. ob_start();  
  12. }  
  13. function tab( $title )   
  14. {  
  15. global $tabs;  
  16. if ( count( $tabs ) > 0 )  
  17. endtab();  
  18. $tabs []= array(  
  19. title => $title,  
  20. text => ""  
  21. );  
  22. }  
  23.  
  24. function tabs_end( )  
  25. {  
  26. global $tabs;  
  27. endtab( );  
  28. ob_end_clean( );  
  29. $index = 0;  
  30. if ( $_GET['tabindex'] )  
  31. $index = $_GET['tabindex'];  
  32. ?> 
  33. < table width="100%" cellspacing="0" cellpadding="0"> 
  34. < tr> 
  35. < ?php  
  36. $baseuri = $_SERVER['REQUEST_URI'];  
  37. $baseuri = preg_replace( "/\?.*$/", "", $baseuri );  
  38. $curindex = 0;  
  39. foreach( $tabs as $tab )  
  40. {  
  41. $class = "tab";  
  42. if ( $index == $curindex )  
  43. $class ="tab-active";  
  44. ?> 
  45. < td class="< ?php echo($class); ?>"> 
  46. < a href="< ?php echo( $baseuri."?tabindex=".$curindex ); ?>"> 
  47. < ?php echo( $tab['title'] ); ?> 
  48. < /a> 
  49. < /td> 
  50. < ?php  
  51. $curindex += 1;  
  52. }  
  53. ?> 
  54. < /tr> 
  55. < tr>< td class="tab-content" colspan="< ?php echo( count( $tabs ) + 1 ); ?>"> 
  56. < ?php echo( $tabs[$index ]['text'] ); ?> 
  57. < /td> 
  58. < /table> 
  59. < ?php  
  60. }  
  61. ?> 

以上這一大段的代碼就是有關(guān)PHP hack的具體實(shí)現(xiàn)方法。


本文標(biāo)題:PHP hack的使用技巧詳解
轉(zhuǎn)載來于:http://uogjgqi.cn/article/cogijeh.html
掃二維碼與項(xiàng)目經(jīng)理溝通

我們在微信上24小時(shí)期待你的聲音

解答本文疑問/技術(shù)咨詢/運(yùn)營咨詢/技術(shù)建議/互聯(lián)網(wǎng)交流