Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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
function foo($arg)
{
return $arg
}
?>
µ±Ä³Ð©²ÎÊýΪ¿ÉÑ¡ÊÇ£¬¿ÉÒÔÕâÑù¶¨Ò壺
<?php
function foo($arg = NULL)
{
return $arg == NULL ? "" : $arg;
}
?>
µ±ÎÒÃDz»ÏÞÖÆ²ÎÊý¸öÊýµÄʱºò£¬Ò²¿ÉÒ ......

PHP ÖлñÈ¡ÎļþÃû¼°Â·¾¶


¡¡¡¡ÎªÁ˽ű¾³ÌÐòµÄ¼æÈÝÐÔ£¬ºÜ¶àʱºò½Å±¾µÄÃû³Æ¶¼²»Êǹ̶¨µÄ¡£ËùÒÔÎÒÃÇÐèҪͨ¹ý¶¯Ì¬»ñÈ¡µ±Ç°½Å±¾µÄ·¾¶¡¢ÎļþÃûÀ´Íê³ÉijЩ¹¦ÄÜ¡£
¡¡¡¡PHP ÖУ¬ÎÒÃÇ¿ÉÒÔʹÓó£Á¿ __FILE__ À´»ñÈ¡µ±Ç°±»Ö´Ðнű¾µÄÍêÕû·¾¶¡£
¡¡¡¡×¢Ò⣺µ±°üº¬´Ë±äÁ¿µÄ½Å±¾±»ÆäËû½Å±¾include»òÕßrequireµÄʱºò£¬ __FILE__ ½«ÈÔÈ»·µ»Ø´Ë½Å±¾µÄµØÖ·£¬¶ø²»ÊÇ ......

[PHP]PearµÄʹÓÃ

1. PEARµÄ°²×°, ÕâÀï½éÉÜÀûÓÃPHP5×Ô´øµÄBATÎļþ°²×°£¬ÐèÒªÄÜÉÏÍø¡£
   a. ÔÚPHP5Ŀ¼ÏÂÕÒµ½go-pear.bat£¬Ë«»÷°²×°(±£Ö¤ÄÜÉÏÍø, ÒÔ±ãÏÂÔØ)£¬BAT×Ô¶¯´ÓÍøÉÏÏÂÔØPEARËùÐèµÄ¶«Î÷£»
   b. °´ÕÕÌáʾÊäÈëһЩÉèÖÃÐÅÏ¢£¬Ö÷ÒªÊÇÒª°Ñ¾ÖÓòÍøµÄÍø¹Ø¼ÓÉÏ£¬Èçhttp://192.168.0.1:80/ , pearÒªÓÃÕâ¸öµØÖ··ÃÎÊInterne ......

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µÄsimpletest¿ò¼Ü¶ÔuchomeÏîÄ¿½øÐнӿڲâÊԽű¾

<?php
require_once ('unit_tester.php');
require_once ('reporter.php');
require_once ('../config.php');
require_once ('../source\modules\user\user_api.func.php');
require_once ('../source/base_model.class.php');
Class registertest extends UnitTestCase{
public function testAssertEqual(){
$b ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ