phpÉú³ÉwordÎĵµ,²¢¿ÉÒÔÏÂÔØ
<?php
if($_POST['str'])
{
header('Content-type: application/doc');
header('Content-Disposition: attachment; filename="downloaded.doc"');
echo iconv("UTF-8","GB2312",$_POST['str']);
}
?>
<a href="javascript:void(0)" onclick="downword()">ÏÂÔØ</a>
<div id="word" style="display:none">¼ÓÏ¢Ô¤ÆÚÏÂÒøÐÐÔÙÍƹÌÏ¢·¿´û
</div>
<form action="" method="POST" name="form">
<textarea style="display:none" name="str" id="down"/></textarea>
</form>
<script>
function downword()
{
var doc=document.getElementById("word").innerHTML;
document.getElementById("down").value=doc;
document.form.submit();
}
</script>
Èç¹ûÏëÉú³ÉÆäËüµÄÎļþ,½«doc¸Ä³ÉÆäËüµÄÀ©Õ¹Ãû¾ÍOKÁË
Ïà¹ØÎĵµ£º
ÏÂÃæ½éÉܼ¸ÖÖPHPÖÐÅжϡ¢Ñ»·µÄ¼¸ÖÖд·¨¡£
×îÆÕͨµÄÅжϣº
<?php
if( $args != NULL )
{
call_func($args);
}
?>
¶ÔÓÚµ¥ÐеÄÖ´ÐÐÓï¾ä£¬¿ÉÒÔд³É£º
<?php
if( $args != NULL ) call_func($args);
?>
Ò²¿ÉÒÔʹÓÃÒýºÅµÄ·½Ê½¡£
<?php
if( $args != NULL ):
call_func($args);
......
<?php
header("Content-Type:image/png");
srand((double)microtime()*1000000);
$img_height=20;
$img_width=60;
$im=@imagecreate($img_width,$img_height) or die("²»Äܳõʼ»¯GDÎļþÁ÷");
$background_color=imagecolorallocate($im,255,255,255);
$text_color=imagecolorallocate($im,233,14,91);
......
run_time.php Code:
<?php
class runtime
{
var $StartTime = 0;
var $StopTime = 0;
function get_microtime()
{
list($usec, $sec) = explode(' ', microtime());
return ((float)$usec + (float)$sec);
}
function start()
{
$this->StartTime = $this->get_microtime();
}
f ......
<?php
function outputMyName($fname) {
echo "ÎÒµÄÃû×ֽР";
echo "ÖÜ ".$fname."<br />";
}
?>
<html>
<body>
<?php
outputMyName("ʤ³¬");
outputMyName("Óîºã");
outputMyName("ÓîÃË");
?>
</body>
</html>
½á¹ûÈçÏ£ ......
´úÂëÈçÏ£¬
// ½¨Á¢Ò»¸öÖ¸ÏòÐÂCOM×é¼þµÄË÷Òý
$word = new COM("word.application") or die("Can't start Word!");
// ÏÔʾĿǰÕýÔÚʹÓõÄWordµÄ°æ±¾ºÅ
echo "Loading Word, v. {$word->Version}
";
exit;
?>
ÓÐʱºòÄã»áµÃµ½Ò»¸ö´íÎó£¬
PHP Fatal error: Uncaught except ......