basexml.php

来自「泛微协同办公系统标准版E-office V5.5的源代码内含泛微办公系统V5.5」· PHP 代码 · 共 44 行

PHP
44
字号
<?php

function setxmlheaders( )
{
	ob_end_clean( );
	header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
	header( "Last-Modified: ".gmdate( "D, d M Y H:i:s" )." GMT" );
	header( "Cache-Control: no-store, no-cache, must-revalidate" );
	header( "Cache-Control: post-check=0, pre-check=0", false );
	header( "Pragma: no-cache" );
	header( "Content-Type: text/xml; charset=utf-8" );
}

function createxmlheader( $command, $resourceType, $currentFolder )
{
	setxmlheaders( );
	echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
	echo "<Connector command=\"".$command."\" resourceType=\"".$resourceType."\">";
	echo "<CurrentFolder path=\"".converttoxmlattribute( $currentFolder )."\" url=\"".converttoxmlattribute( geturlfrompath( $resourceType, $currentFolder ) )."\" />";
	$GLOBALS['HeaderSent'] = true;
}

function createxmlfooter( )
{
	echo "</Connector>";
}

function senderror( $number, $text )
{
	setxmlheaders( );
	echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
	echo "<Connector>";
	senderrornode( $number, $text );
	echo "</Connector>";
	exit( );
}

function senderrornode( $number, $text )
{
	echo "<Error number=\"".$number."\" text=\"".htmlspecialchars( $text )."\" />";
}

?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?