phpÏÂÔØÎļþÏà¹Ø×ÊÁÏ
µ±ÏÂÔØÎļþÐèÒªÓë·þÎñ¶Ë½»»¥Ê±£¬¾ÍÐèÒªÓýű¾À´ÊµÏÖ£¬¶ø²»Êǵ¥´¿µØÁ´½Óµ½ÎļþµÄµØÖ·
ÏÂÔØmp3ÎļþµÄÀý×Ó
<?php
$file_path = './data/upload/song/sample.mp3';
$file_name = 'sample.mp3';
$file_size = filesize($file_path);
header ( "Pragma: public" );
header ( "Cache-Control: must-revalidate, post-check=0, pre-check=0" );
header ( "Cache-Control: private", false );
header ( "Content-Transfer-Encoding: binary" );
header ( "Content-Type:audio/mpeg MP3");
header ( "Content-Length: " . $file_size);
header ( "Content-Disposition: attachment; filename=".$file_name);
echo(file_get_contents($file_path));
exit;
?>
ÒÔÏÂÁбíÀ´×Ôhttp://hi.baidu.com/zbzb /blog/item/643cd60021d25d11738b6530.html
Content-type µÄ˵Ã÷ 'application/andrew-inset',
'hqx' => 'application/mac-binhex40',
'cpt' => 'application/mac-compactpro',
'doc' => 'application/msword',
'bin' => 'application/octet-stream',
'dms' => 'application/octet-stream',
'lha' => 'application/octet-stream',
'lzh' => 'application/octet-stream',
'exe' => 'application/octet-stream',
'class' => 'application/octet-stream',
'so' => 'application/octet-stream',
'dll' => 'application/octet-stream',
'oda' => 'application/oda',
'pdf' => 'application/pdf',
'ai' => 'application/postscript',
'eps' => 'application/postscript',
'ps' => 'application/postscript',
'smi' => 'application/smil',
'smil' => 'application/smil',
'mif' => 'application/vnd.mif',
'xls' => 'application/vnd.ms-excel',
'ppt' => 'application/vnd.ms-powerpoint',
'wbxml' => 'application/vnd.wap.wbxml',
'wmlc' => 'application/vnd.wap.wmlc',
'wmlsc' => 'application/vnd.wap.wmlscriptc',
'bcpio' => 'application/x-bcpio',
'vcd' => 'application/x-cdlink',
'pgn' => 'application/x-chess-pgn',
'cpio' => 'application/x-cpio',
'csh' => 'application/x-csh',
'dcr' => 'application/x-director',
'di
Ïà¹ØÎĵµ£º
ת×Ô http://wiki.kuaizhanbao.com/2009/1210/245.html
basename — ·µ»Ø·¾¶ÖеÄÎļþÃû²¿·Ö
chgrp — ¸Ä±äÎļþËùÊôµÄ×é
chmod — ¸Ä±äÎļþģʽ
chown — ¸Ä±äÎļþµÄËùÓÐÕß
clearstatcache — Çå³ýÎļþ״̬»º´æ
copy — ¿½±´Îļþ
delete — ²Î¼û unlink() »ò unset()
di ......
is_intº¯Êý¶ÔÓÚFORM¹ýÀ´µÄÊý¾ÝÊÇûÓа취ÅжÏÊÇ·ñÊÇÕûÊýµÄ£¬ÒòΪFORM¹ýÀ´µÄÊÇ×Ö·û´®¡£ÓÃis_numeric¿ÉÒÔÅжÏÊÇ·ñΪÊý×ÖÀàÐÍ£¬ÉÔ¶¯ ÏÂÊֽžͿÉÒÔÅжÏÊDz»ÊÇÕûÊýÁË
if(!is_numeric($jp_total)||strpos($jp_total,".")!==false){
echo "²»ÊÇÕûÊý";
}else{
echo "ÊÇÕûÊý";
} ......
GyPSiiÀûÓÃXML-RPC£¬PHPÀïXML-RPCµÄÏà¹ØÓ¦ÓÃʾÀýºÜ¶à£¬²é²éÊֲᡢGOOGLEһϾͿÉÒÔÕÒµ½ºÜ¶à¡£GyPSii APIÀïÌṩÁËÒ»¸ö²Ù×÷ÀàÓÃÀ´ÇëÇó·þÎñ£¬²¢ÌṩÁËÒ»¸öÇëÇóº¯Êý£¬Ö»Òª½«´Ëº¯Êý·Å½ø²Ù×÷ÀàÀ¾Í¿ÉÒÔ·½±ãµÄʹÓÃÁË£¬º¯ÊýÈçÏ£º
function GyPSiiXMLRPC( $uri, $host, $pid, $body="" ) {
$this->addHeader( 'Content-T ......
1
£®
Çë¶Ô
POSIX
·ç¸ñºÍ¼æÈÝ
Perl
·ç¸ñÁ½ÖÖÕýÔò
±í´ïʽµÄÖ÷Òªº¯Êý½øÐÐÀà±È˵Ã÷
ereg
preg_match
ereg_replace
preg_replace
2
£®
Çë˵Ã÷ÔÚ
php
.ini
ÖÐ
safe_mode
¿ªÆôÖ®ºó¶ÔÓÚ
PHP
ϵͳ
º¯ÊýµÄÓ°Ïì
3
£®
PHP5
ÖÐħÊõ
·½·¨
º¯ÊýÓÐÄļ¸¸ö£¬Çë¾ÙÀý˵à ......
Îļþphp.ini·ÅÈëwindowsÏ£¬½«ÏÂÃæÄÚÈÝ¿½±´µ½¼Çʱ¾ÃüÃûΪphp.ini·ÅÈëc:/windowsÏÂ,ÖØÆôApache server£º
[PHP]
;;;;;;;;;;;
; WARNING ;
;;;;;;;;;;;
; This is the default settings file for new PHP installations.
; By default, PHP installs itself with a configuration suitable for
; development purposes ......