Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : php

php ·À×¢Èë¹¥»÷º¯Êý

/*php ·À×¢È뺯Êý
string  $feifa  ÏÞÖÆÔªËØ×é³É
ÈçÓзǷ¨×Ö·ûÌøתµ½ÉÏÒ»Ò³ ·µ»Ø 0  Ã»Óзµ»Ø 1
*/
//ʹÓ÷½·¨
//$feifa=array("select","delete","from","update","create","destory","drop","alter","and","or","like","exec","count","*","chr","mid","master","truncate","char","declare",";","-","+");
//$arrpostget=array("http://www.baidu.select cretecomdmin","wangw");
//echo saftsql($feifa,$arrpostget);
function saftsql($feifa,$arrpostget){
//
$arrpostget=array_merge((array)$HTTP_PSOT_VARS,(array)$HTTP_GET_VARS);
  if($arrpostget){
         foreach($arrpostget as $key=>$value){
               ......

php»ñÈ¡³ÌÐòÖ´ÐеÄʱ¼ä

ÔÚhead.htmÖмÓÈ룬Ҳ¾ÍÊÇÔÚĬÈÏÄ£°æÖÐÌí¼Ó“$stime=microtime(true); //»ñÈ¡³ÌÐò¿ªÊ¼Ö´ÐеÄʱ¼ä”
¾ä
<!--<?php
$stime=microtime(true); //»ñÈ¡³ÌÐò¿ªÊ¼Ö´ÐеÄʱ¼ä
$GuideFid[$fid]=str_replace("<a href='$webdb[www_url]' class='guide_menu'>>Ê×Ò³</a>","",$GuideFid[$fid]);
$fupId=intval($fupId);
$topMenu[$fupId]='ck';
print <<<EOT
-->
ÕâÀïÊÇÍøÒ³
ÔÙÔÚfoot.htmÐÞ¸ÄÈ磺
<!--
EOT;
$etime=microtime(true);//»ñÈ¡³ÌÐòÖ´ÐнáÊøµÄʱ¼ä
$total=$etime-$stime;   //¼ÆËã²îÖµ
echo "<br />[Ò³ÃæÖ´ÐÐʱ¼ä£º{$total} ]Ãë";
?> ......

³£ÓÃʱ¼ä¸ñʽÓëPHPʱ¼ä¸ñʽÏ໥ת»»

ÎÄ/Fenying
 
¡¡¡¡ÀýÈçÓг£ÓÃʱ¼ä¸ñʽ yyyy-mm-dd HH:ii:ss£¬ÈçºÎת»»³ÉPHPÖÐdateº¯Êý¿ÉʹÓõÄʱ¼ä¸ñʽÄØ£¿
¡¡¡¡Ê¹ÓàPHPTimeFormatfromCommon() ¿ÉÒÔ°ÑͨÓÃʱ¼ä¸ñʽת»»³ÉPHPʱ¼ä¸ñʽ
¡¡¡¡¡¡¡¡PHPTimeFormatfromCommon('yyyy-mm-dd HH:ii:ss') => 'Y-m-d H:i:s'
¡¡¡¡Ê¹Óà PHPTimeFormatToCommon() ¿ÉÒÔ°ÑPHPʱ¼ä¸ñʽת»»³ÉͨÓÃʱ¼ä¸ñʽ
¡¡¡¡¡¡¡¡PHPTimeFormatToCommon('Y-m-d H:i:s') =>  'yyyy-mm-dd HH:ii:ss'
¡¡¡¡ÀýÈ磺
¡¡¡¡¡¡¡¡echo gmdate(PHPTimeFormatfromCommon('yyyy-mm-dd HH:ii:ss A DD'), time() + 8 * 3600);
¡¡¡¡½á¹û£º
¡¡¡¡¡¡¡¡2010-04-10 11:11:54 AM Saturday
¡¡¡¡¾ßÌåʹÓÃ˵Ã÷Çë¿´´úÂëÖеÄ×¢ÊÍ£¬ÓÐÏêϸ˵Ã÷¡£ 
/*
    PHP Time Formatting Functions
    Author: Fenying
    Version: 1.0.0.1
    Time: 2010-04-10
    CopyRight: All CopyRight Fenying Studio 2007-2010 Reserved.
*/
 
    $DS_TIME_TimeSign = array(
        array('yyyy', ......

ÊÕ²ØÒ»¸öphpͼƬ´¦ÀíÀà

ʹÓ÷½·¨:
×Ô¶¯²ÃÇÐ:
³ÌÐò»á°´ÕÕͼƬµÄ³ß´ç´ÓÖв¿²ÃÇÐ×î´óµÄÕý·½ÐΣ¬²¢°´Ä¿±ê³ß´ç½øÐÐËõÂÔ
  
    $t->setSrcImg("img/test.jpg");
    $t->setCutType(1);//ÕâÒ»¾ä¾ÍOKÁË
    $t->setDstImg("tmp/new_test.jpg");
    $t->createImg(60,60);
  
ÊÖ¹¤²ÃÇÐ:
³ÌÐò»á°´ÕÕÖ¸¶¨µÄλÖôÓԴͼÉÏȡͼ
  
    $t->setSrcImg("img/test.jpg");
    $t->setCutType(2);//Ö¸Ã÷ΪÊÖ¹¤²ÃÇÐ
    $t->setSrcCutPosition(100, 100);// ԴͼÆðµã×ø±ê
    $t->setRectangleCut(300, 200);// ²ÃÇгߴç
    $t->setDstImg("tmp/new_test.jpg");
    $t->createImg(300,200); 
Ô´´úÂëÏÂÔØ
Ô­ÎĵØÖ·£ºhttp://www.megeee.cn/article/php/php-img-class.html
......

ÊÖ¶¯ÅäÖÃnginx+php cgi+zend+mysql

±¾ÎÄÊʺÏCentOS¡£Ò»²½Ò»²½À´£¬²»Òª´í¡£
ÏÈÏÂÔع¤¾ßssh shell£¬¸öÈ˸оõÕâ¸ö±È½ÏºÃÓã¬ÍƼö¸ø´ó¼Ò
http://docs.isvps.net/soft/SSHSecureShellClient-3.2.9.zip
È»ºóÊÇһЩ±ØÒªµÄÈí¼þ°ü
nginxÔ´Âë°ü: http://www.nginx.org/download/nginx-0.7.65.tar.gz
phpÔ´Âë°ü: http://cn.php.net/distributions/php-5.2.11.tar.gz
php-fpm²¹¶¡: http://php-fpm.org/downloads/php-5.2.11-fpm-0.5.13.diff.gz
Ò».×¼±¸¹¤×÷
1.ssh µÇ¼µ½VPS,µ±Ç°Ä¿Â¼ÊÇ /root, ²»Òª¶¯¡£
2.ÓÃwgetÃüÁîÏÂÔØÉÏÊöÈí¼þ°ü
wget http://www.nginx.org/download/nginx-0.7.65.tar.gz
wget http://cn.php.net/distributions/php-5.2.11.tar.gz
wget http://php-fpm.org/downloads/php-5.2.11-fpm-0.5.13.diff.gz
3.°²×°Ò»Ð©±ØÒªµÄϵͳÈí¼þ°ü£¬ÕâЩ¶¼ÊDZØÐëµÄ°ü£¬ËûÃǵŦÄÜÇë´ó¼Ò×Ô¼º°Ù¶È£¬°Ù¶È²»µ½¾Í¹È¸è£¬¹È¸è²»µ½ÔÙÌáÎÊ
yum install gcc
yum install patch
yum install pcre-devel.i386
yum install openssl-devel.i386
yum install libxml2-devel.i386
yum install libjpeg-devel.i386
yum install libpng-devel.i386
yum install mysql-devel.i386
¶þ.°²×°nginx
1.ÏÈ¿´¿´×Ô¼ºÔÚÄĸöĿ¼À ......

301Öض¨ÏòÉèÖü°³ÌÐò´úÂëʵÏÖÈ«¼¯(ASP|.NET|PHP|JSP)

Ê×ÏÈÉêÃ÷£ºÕâ¸öÊÇÎÒתÔصģ¬ÖÂÁ¦ÓÚΪÏñÎÒÒ»ÑùµÄÐÂÊÖÌṩ°ïÖú£¡
1¡¢IISÏÂ301ÉèÖà InternetÐÅÏ¢·þÎñ¹ÜÀíÆ÷ -> ÐéÄâĿ¼ -> Öض¨Ïòµ½URL£¬ÊäÈëÐèҪתÏòµÄÄ¿±êURL£¬²¢Ñ¡Ôñ“×ÊÔ´µÄÓÀ¾ÃÖض¨Ïò”¡£
2¡¢ASPϵÄ301תÏò´úÂë
<%@ Language=VBScript %>
<%
Response.Status=”301 Moved Permanently”
Response.AddHeader “Location”, “http://www.xuehi.com/articles/301/”
%>
3¡¢ASP.NetϵÄ301תÏò´úÂë
<script runat=”server”>
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = “301 Moved Permanently”;
Response.AddHeader(”Location”,”http://www.xuehi.com/articles/301/“);
}
</script>
4¡¢PHPϵÄ301תÏò´úÂë
header(”HTTP/1.1 301 Moved Permanently”);
header(”Location: http://www.xuehi.com/articles/301/”);
exit();
5¡¢CGI PerlϵÄ301תÏò´úÂë
$q = new CGI;
print $q->redirect(”http://www.new-url.com/”);
6¡¢JSPϵÄ301תÏò´úÂë
&l ......

301Öض¨ÏòÉèÖü°³ÌÐò´úÂëʵÏÖÈ«¼¯(ASP|.NET|PHP|JSP)

Ê×ÏÈÉêÃ÷£ºÕâ¸öÊÇÎÒתÔصģ¬ÖÂÁ¦ÓÚΪÏñÎÒÒ»ÑùµÄÐÂÊÖÌṩ°ïÖú£¡
1¡¢IISÏÂ301ÉèÖà InternetÐÅÏ¢·þÎñ¹ÜÀíÆ÷ -> ÐéÄâĿ¼ -> Öض¨Ïòµ½URL£¬ÊäÈëÐèҪתÏòµÄÄ¿±êURL£¬²¢Ñ¡Ôñ“×ÊÔ´µÄÓÀ¾ÃÖض¨Ïò”¡£
2¡¢ASPϵÄ301תÏò´úÂë
<%@ Language=VBScript %>
<%
Response.Status=”301 Moved Permanently”
Response.AddHeader “Location”, “http://www.xuehi.com/articles/301/”
%>
3¡¢ASP.NetϵÄ301תÏò´úÂë
<script runat=”server”>
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = “301 Moved Permanently”;
Response.AddHeader(”Location”,”http://www.xuehi.com/articles/301/“);
}
</script>
4¡¢PHPϵÄ301תÏò´úÂë
header(”HTTP/1.1 301 Moved Permanently”);
header(”Location: http://www.xuehi.com/articles/301/”);
exit();
5¡¢CGI PerlϵÄ301תÏò´úÂë
$q = new CGI;
print $q->redirect(”http://www.new-url.com/”);
6¡¢JSPϵÄ301תÏò´úÂë
&l ......

301Öض¨ÏòÉèÖü°³ÌÐò´úÂëʵÏÖÈ«¼¯(ASP|.NET|PHP|JSP)

Ê×ÏÈÉêÃ÷£ºÕâ¸öÊÇÎÒתÔصģ¬ÖÂÁ¦ÓÚΪÏñÎÒÒ»ÑùµÄÐÂÊÖÌṩ°ïÖú£¡
1¡¢IISÏÂ301ÉèÖà InternetÐÅÏ¢·þÎñ¹ÜÀíÆ÷ -> ÐéÄâĿ¼ -> Öض¨Ïòµ½URL£¬ÊäÈëÐèҪתÏòµÄÄ¿±êURL£¬²¢Ñ¡Ôñ“×ÊÔ´µÄÓÀ¾ÃÖض¨Ïò”¡£
2¡¢ASPϵÄ301תÏò´úÂë
<%@ Language=VBScript %>
<%
Response.Status=”301 Moved Permanently”
Response.AddHeader “Location”, “http://www.xuehi.com/articles/301/”
%>
3¡¢ASP.NetϵÄ301תÏò´úÂë
<script runat=”server”>
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = “301 Moved Permanently”;
Response.AddHeader(”Location”,”http://www.xuehi.com/articles/301/“);
}
</script>
4¡¢PHPϵÄ301תÏò´úÂë
header(”HTTP/1.1 301 Moved Permanently”);
header(”Location: http://www.xuehi.com/articles/301/”);
exit();
5¡¢CGI PerlϵÄ301תÏò´úÂë
$q = new CGI;
print $q->redirect(”http://www.new-url.com/”);
6¡¢JSPϵÄ301תÏò´úÂë
&l ......
×ܼǼÊý:2174; ×ÜÒ³Êý:363; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [25] [26] [27] [28] 29 [30] [31] [32] [33] [34]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ