时间:2021-07-01 10:21:17 帮助过:17人阅读
PHP hack示例:
- php
- }
- function tabs_start()
- {
- ob_start();
- }
- function endtab()
- {
- global $tabs;
- $text = ob_get_clean();
- $tabs[ count( $tabs ) - 1 ][ 'text' ] = $text;
- ob_start();
- }
- function tab( $title )
- {
- global $tabs;
- if ( count( $tabs ) > 0 )
- endtab();
- $tabs []= array(
- title => $title,
- text => ""
- );
- }
- function tabs_end( )
- {
- global $tabs;
- endtab( );
- ob_end_clean( );
- $index = 0;
- if ( $_GET['tabindex'] )
- $index = $_GET['tabindex'];
- ?>
- < table width="100%" cellspacing="0" cellpadding="0">
- < tr>
- < ?php
- $baseuri = $_SERVER['REQUEST_URI'];
- $baseuri = preg_replace( "/?.*$/", "", $baseuri );
- $curindex = 0;
- foreach( $tabs as $tab )
- {
- $class = "tab";
- if ( $index == $curindex )
- $class ="tab-active";
- ?>
- < td class="< ?php echo($class); ?>">
- < a href="< ?php echo( $baseuri."?tabindex=".$curindex ); ?>">
- < ?php echo( $tab['title'] ); ?>
- < /a>
- < /td>
- < ?php
- $curindex += 1;
- }
- ?>
- < /tr>
- < tr>< td class="tab-content" colspan="< ?php echo( count( $tabs ) + 1 ); ?>">
- < ?php echo( $tabs[$index ]['text'] ); ?>
- < /td>tr>
- < /table>
- < ?php
- }
- ?>
以上这一大段的代码就是有关PHP hack的具体实现方法。
http://www.bkjia.com/PHPjc/446113.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/446113.htmlTechArticlePHP hack示例: ?php $ tabs = array (); functiontabs_header() { ? style type = text/css .tab{ border-bottom:1pxsolidblack; text-align:center; font-family:arial,verdana; } .tab-ac...