Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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ÖÐÅжϡ¢Ñ­»·µÄ¼¸ÖÖд·¨¡£
×îÆÕͨµÄÅжϣº
<?php
if( $args != NULL )
{
call_func($args);
}
?>
¶ÔÓÚµ¥ÐеÄÖ´ÐÐÓï¾ä£¬¿ÉÒÔд³É£º
<?php
if( $args != NULL ) call_func($args);
?>
Ò²¿ÉÒÔʹÓÃÒýºÅµÄ·½Ê½¡£
<?php
if( $args != NULL ):
call_func($args); ......

PHPÑéÖ¤ÂëÉú³É½Å±¾£¨5λÊý×Öpng¸ñʽ£©


<?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);
......

PHP¼ÆËãÒ³ÃæÖ´ÐÐʱ¼ä

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ǶÈëhtml

<?php
function outputMyName($fname) {
   echo "ÎÒµÄÃû×ֽР";
    echo "ÖÜ ".$fname."<br />";
}
 ?>
<html>
<body>
<?php
outputMyName("ʤ³¬");
outputMyName("Óîºã");
outputMyName("ÓîÃË");
?>
</body>
</html>
½á¹ûÈçÏ£ ......

phpÖÐʹÓÃcom×é¼þ³öÏÖ"¾Ü¾ø·ÃÎÊ"µÄ´¦Àí


´úÂëÈçÏ£¬
// ½¨Á¢Ò»¸öÖ¸ÏòÐÂ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 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ