php ²»ÓÃCOM Éú³ÉexcelÎļþ
ÓÃphpÉú³ÉexcelÎļþ
<?
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=test.xls");
echo "test1/t";
echo "test2/t/n";
echo "test1/t";
echo "test2/t/n";
echo "test1/t";
echo "test2/t/n";
echo "test1/t";
echo "test2/t/n";
echo "test1/t";
echo "test2/t/n";
echo "test1/t";
echo "test2/t/n";
?>
¡¡¡¡ÔÚphp»·¾³ÔËÐÐÉÏÃæµÄ´úÂ룬´ó¼Ò¾Í¿ÉÒÔ¿´µ½ä¯ÀÀÆ÷ѯÎÊÓû§ÊÇ·ñÏÂÔØexcelÎĵµ£¬µã»÷±£´æ£¬Ó²ÅÌÉϾͶàÁËÒ»¸öexcelµÄÎļþ£¬Ê¹ÓÃexcel´ò¿ª¾Í»á¿´µ½×îÖյĽá¹û£¬ÔõôÑù²»´í°É¡£
¡¡¡¡ÆäʵÔÚ×öÕæÕýµÄÓ¦ÓõÄʱºò£¬´ó¼Ò¿ÉÒÔ½«Êý¾Ý´ÓÊý¾Ý¿âÖÐÈ¡³ö£¬È»ºó°´ÕÕÿһÁÐÊý¾Ý½áÊøºó¼Ó/t,ÿһÐÐÊý¾Ý½áÊøºó¼Ó/nµÄ·½·¨echo³öÀ´£¬ÔÚphpµÄ¿ªÍ·ÓÃheader("Content-type:application/vnd.ms-excel");±íʾÊä³öµÄÊÇexcelÎļþ£¬ÓÃheader("Content-Disposition:filename=test.xls");±íʾÊä³öµÄÎļþÃûΪtext.xls¡£ÕâÑù¾ÍokÁË¡£
¡¡¡¡ÎÒÃǸü¿ÉÒÔÐÞ¸ÄheaderÈÃËûÊä³ö¸ü¶à¸ñʽµÄÎļþ£¬ÕâÑùphpÔÚ´¦Àí¸÷ÖÖÀàÐÍÎļþ·½Ãæ¾Í¸ü¼Ó·½±ãÁË£®
Ïà¹ØÎĵµ£º
ÔÚjavascriptÖÐÓ÷¨¾ÙÀý
var rule = /^\d+$/;
if(!rule.test(addform.rmb_price.value)) {
alert('rmb_price must be number');
addform.rmb_price.focus();
return false;
}
ÔÚphpÖÐÓ÷¨¾ÙÀý
$aa = "/^\d+$/";
if(preg_match($aa, "111")) {
echo "found";
}
ÔÚjavaÖÐÓ÷¨¾ÙÀý ......
ͼƬÑéÖ¤ÂëµÄÔÀíÊÇ·ÀÖ¹¶ñÒâ×¢²á£¬ÊµÏÖ·½·¨
ÑéÖ¤Â룺<input type="text" name="yanzhengma" />
<iframe src="code/middle.php" height="20px" width="65px" frameborder="0" id="chkimg" scrolling="no" style=" margin-top:5px">
</iframe>
<a href="javascript:chkimg.location.reload(); ......
ÔÚʹÓÃÉÏ´«Îļþʱ£¬½«ÉÏ´«µÄ´úÂë·â×°³ÉÀ࣬¸üÈÝÒ×·½±ã¡£
190.php
<?php
require('upload.php');
if($_POST['submit']){
$a = new Upload();
$File = $a -> uploadfile($ARG=array(
'File'=>array(
'name' => $_FILES['fileDoc']['name'], //Ô ......
--------------01-05--------------------
*
* Îļþ²Ù×÷
*
---------------------------------------
¶ÁÈ¡Õû¸öÎļþ: readfile(), fpassthru(), file()
¶Áȡһ¸ö×Ö·û: fgetc()
¶ÁÈ¡ÈÎÒⳤ¶È: fread()
²é¿´ÎļþÊÇ·ñ´æÔÚ: file_exis ......
±í´ïʽÊÇ PHP ×îÖØÒªµÄ»ùʯ¡£ÔÚ PHP ÖУ¬¼¸ºõÄãËùдµÄÈκζ«Î÷¶¼ÊÇÒ»¸ö±í´ïʽ¡£¼òµ¥µ«È´×ȷµÄ¶¨ÒåÒ»¸ö±í´ïʽµÄ·½Ê½¾ÍÊÇ“anything that has a value”¡£
×î»ù±¾µÄ±í´ïʽÐÎʽÊdz£Á¿ºÍ±äÁ¿¡£µ±Äã¼üÈë“$a = 5”£¬¼´½«Öµ '5' ·ÖÅ䏸±äÁ¿ $a¡£'5'£¬ºÜÃ÷ÏÔ£¬ÖµÎª 5£¬»»¾ä»°Ëµ '5' ÊÇÒ»¸öֵΪ5µÄ±í´ïʽ£ ......