PlayGround

测试php代码

<?php
function getToc(){
	global $ID;
	$except = array("admin", "revisions", "diff");
	if(in_array($_REQUEST["do"], $except) || auth_quickaclcheck($ID) < 1) return false;
	
	require_once(DOKU_INC.'inc/parserutils.php');
	
	$content = p_wiki_xhtml($ID);
	$start = "<div class=\"toc\">";
	$end = "</div>\n</div>";
	
	$int_start = strpos($content, $start);
	$int_end = strpos($content, $end);
	if($int_start === false || $int_end === false){
		return false;
	}
	$retour = substr($content, $int_start, ($int_end + strlen($end)) );	
	return $retour;
} 
?>

标题 H2

playground/playground.txt · 最后更改: 2008/12/19 07:36 由 kenvin
到顶部
chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0 红麦软件 红麦软件