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
MVC¿ò¼Ü¡£¾ßÌåÅÅÃû˳Ðòδ±Ø×¼È·£¬»¹ÓÐЩ֪Ãû¿ò¼Ü£¬ÈçKohanaµÈҲûÓÐÌá¼°¡£²»¹ýÈÔ¿ÉÒÔ×öΪһƪ²»´íµÄ²Î¿¼¡£
ÒÔÏÂΪʮ¸öĿǰ×îÁ÷ÐеĻùÓÚMVCÉè¼ÆÄ£Ê½µÄPHP¿ò¼Ü¡£
1. Yii
YiiÊÇÒ»¸ö»ùÓÚ×é¼þµÄ¸ßÐÔÄܵÄPHPµÄ¿ò¼Ü£¬ÓÃÓÚ¿ª·¢´ó¹æÄ£WebÓ¦Óá£Yii²ÉÓÃÑ ......
ÏÂÃæ½éÉܼ¸ÖÖPHPÖÐÅжϡ¢Ñ»·µÄ¼¸ÖÖд·¨¡£
×îÆÕͨµÄÅжϣº
<?php
if( $args != NULL )
{
call_func($args);
}
?>
¶ÔÓÚµ¥ÐеÄÖ´ÐÐÓï¾ä£¬¿ÉÒÔд³É£º
<?php
if( $args != NULL ) call_func($args);
?>
Ò²¿ÉÒÔʹÓÃÒýºÅµÄ·½Ê½¡£
<?php
if( $args != NULL ):
call_func($args);
......
<?php
define('SMARTY_TMP_DIR','C:/php5/Smarty-2.6.13/');
define('SMARTY_DIR','C:/php5/Smarty-2.6.13/libs/'); //SMARTY_DIR ->smarty keyword,must be defined as libs dectory
require_once(SMARTY_DIR.'Smarty.class.php');
//½¨Á¢Ò»¸ösmarty¶ÔÏó
$smarty = new Smarty;
$smarty->template_dir = ......
<?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 ......
configure: error: Unable to find libgd.(a|so)
Èç¹ûʹÓõÄÊÇubuntu»òdebian¾ÍºÜ¼òµ¥ÁË£¬Ö±½Ósudo apt-get install apache2
libapache2-mod-php5 php5 php5-gd ¾Í»ù±¾Éϸ㶨£¬µ«ÊÇÓÃÔ´´úÂë°²×°»¹ÊǺÜÂé·³¡«
wget http://www.boutell.com/gd/http/gd-2.0.11.tar.gz
tar zxvf gd-2.0.11.tar.gz
cd gd-2.0.11
sudo . ......