php ËõÂÔͼº¯Êý
function getThumbs($filename,$savepath,$d_w,$d_h,$b,$img_name)
{
if($b)
{
$photourl = $savepath."/".$img_name;
}else
{
$photourl = $savepath;
}
$width = $d_w;
$height= $d_h;
list($width_orig, $height_orig,$image_type) = getimagesize($filename);
$extends = $image_type == 1 ? "gif" : "jpg";
$x = 0;$y = 0;
if($d_w==$d_h)
{
if ($width && ($width_orig < $height_orig))
{
$height = ($width / $width_orig) * $height_orig;
$y = round(($height-$d_h)/2);
} else
{
$width = ($height / $height_orig) * $width_orig;
$x = round(($width-$d_w)/2);
}
}else
{
if($d_h>$d_w)
{
$width = ($height / $height_orig) * $width_orig;
// $x = round(($width-$d_w)/2);
}else
{
$height = ($wi
Ïà¹ØÎĵµ£º
phpÌØÊâ×Ö·û¹ýÂË
1¡¢¹ýÂ˱êÇ©(HTML)£ºstrip_tags()
ÀýÈ磺
<?php
$text = '<?php ?><p>Test paragraph.</p><!-- Comment -
-> <a href=http://topic.csdn.net/u/20090311/09/"#fragment">Other text</a>';
echo strip_tags($text);
echo "\n";
// ÔÊÐíʹÓÃ<p>ºÍ< ......
µ±ÎÒÃÇÓÃWINDOWSËÑË÷ij°üº¬Ä³ÎÄ×ÖµÄÎļþʱ£¬¿ÉÒÔÔÚ“°üº¬ÎÄ×Ö”´¦ÌîÉÏËÑË÷´Ê¡£µ«ÊÇһЩ²»³£¼ûµÄºó׺ÃûÎļþWINDOWS²»»áËÑË÷£¬È磺£¬.log¡¢.dll¡¢.js¡¢.asp¡¢.xml¡¢.xsl¡¢.hta¡¢.css¡¢.wsh¡¢.cpp¡¢.c »ò .hµÈ¼°ÎÞºó׺ÃûµÄÎļþ¡£¶ÔÓÚÎҵȳÌÐò°®ºÃÕßÀ´ËµÊµÔÚÌ«²»·½±ãÁË£¬ËäÈ»ÓГÎı¾Ìæ»»´óʦ”µÈÈí¼þÄÜ×öÕ ......
£¨×ª£©ÎÊÌ⣺
ÓÐûÓа취ÔÚphpÖÐʵÏÖ¶àÏß³ÌÄØ£¿
¼ÙÉèÄãÕýÔÚдһ¸ö»ùÓÚ¶ą̀·þÎñÆ÷µÄphpÓ¦Óã¬ÀíÏëµÄÇé¿öʱͬʱÏò¶ą̀·þÎñÆ÷·¢ËÍÇëÇ󣬶ø²»ÊÇһ̨½Óһ̨¡£
¿ÉÒÔʵÏÖÂð£¿
»Ø´ð£º
µ±ÓÐÈËÏëҪʵÏÖ²¢·¢¹¦ÄÜʱ£¬ËûÃÇͨ³£»áÏëµ½ÓÃfork»òÕßspawn threads£¬µ«Êǵ±ËûÃÇ·¢ÏÖphp²»Ö§³Ö¶àÏ̵߳Äʱºò£¬´ó¸Å»áת»»Ë¼Â·È¥ÓÃһЩ²»¹»ºÃµÄ ......
phpÌØÊâ×Ö·û¹ýÂË
1¡¢¹ýÂ˱êÇ©(HTML)£ºstrip_tags()
ÀýÈ磺
<?php
$text = '<?php ?><p>Test paragraph.</p><!-- Comment -
-> <a href=http://topic.csdn.net/u/20090311/09/"#fragment">Other text</a>';
echo strip_tags($text);
echo "\n";
// ÔÊÐíʹÓÃ<p>ºÍ< ......
php -h¿ÉÒÔ»ñÈ¡°ïÖúÐÅÏ¢¡£PHP°æ±¾ºÅÐÅÏ¢£º/your_current_path/php -v£¬PHPÔËÐнű¾£º/your_current_path/php your_file_path£¬PHPÔËÐÐÓï¾ä/your_current_path/php -r your_code_snippet¡£
´úÂëÖ´ÐнáÊøºó£¬PHP»á¸ù¾Ý¾ßÌåÖ´ÐÐÇé¿ö×Ô¶¯µÄÊÍ·Å£¬Èç¹ûÖ´Ðйý³ÌÖÐÄÚ´æÏûºÄ½Ï´ó£¬¿ÉÒÔÀûÓÃNULL»òunsetÀ´ÊÍ·ÅÄÚ´æ¡£Çø±ðÔÚÓÚ£¬Ç°Õß ......