PHPÖ®smarty
smarty×÷ΪPHPµÄÄ£°å£¬ÊµÏÖÁËǰ̨ÃÀ¹¤Óëºǫ́Âß¼µÄ·ÖÀ롣ǰһ¶Îʱ¼ä¼òµ¥µØÑ§ÁËһϣ¬°ÑÆä°²×°ÓÚÅäÖÃÒÔ¼°ÄÚ²¿µÄÓï·¨À´¼òµ¥×ܽáһϡ£È»ºóÒªÉè¼ÆÒ»Ïµç×ÓÉÌÎñϵͳ¡£
smartyѹËõ°ü½âѹºó£¬ÔÚlibsÎļþ¼ÐÏ£¬ÓÐ2¸öĿ¼ºÍ4¸öÎļþ£¬2¸öÎļþ¼Ð·Ö±ðÊÇinternalsºÍplugins£¬4¸öÎļþÒÀ´ÎÊÇdebug,smarty.class,config_file.class,smarty_compiler.class¡£Õâ2¸öĿ¼ºÍ4¸öÎļþÐèÒª¿½È밲װĿ¼¡£°²×°Íê³Éºó£¬ÐèÒª½¨Ò»¸ösmartyµÄÅäÖÃÎļþ£¬Ò»°ãÃüÃûΪsmarty_config.php,ÄÚ²¿´úÂëÐèÒª¶¨ÒåsmartyµÄ±àÒëĿ¼µÈµÈ¡£´úÂëÒ»°ãÈçÏÂ
<?php
¡¡¡¡include "class/Smarty.class.php";
¡¡¡¡define('__SITE_ROOT', 'd:/appserv/web/demo'); // ×îºóûÓÐбÏß
¡¡¡¡$tpl = new Smarty();
¡¡¡¡$tpl->template_dir = __SITE_ROOT . "/templates/";
¡¡¡¡$tpl->compile_dir = __SITE_ROOT . "/templates_c/";
¡¡¡¡$tpl->config_dir = __SITE_ROOT . "/configs/";
¡¡¡¡$tpl->cache_dir = __SITE_ROOT . "/cache/";
¡¡¡¡$tpl->left_delimiter = '<{';
¡¡¡¡$tpl->right_delimiter = '}>';
¡¡¡¡?>
°üÀ¨ÉèÖÃÄ£°åĿ¼£¬±àÒëĿ¼£¬×óÓÒ·Ö¸ô·ûµÈµÈ¡£
Ïà¹ØÎĵµ£º
define("DB_SERVER","127.0.0.1");
define("DB_PORT",3306);
define("DB_CATALOG","uab");
define("DB_USERID","root");
define("DB_PASSWORD","");
$dsn="mysql:host=".DB_SERVER.";port=".DB_PORT.";dbname=".DB_CATALOG;
self::$__PDO=new PDO($dsn, DB_USERID, DB_PASSWORD);
//support long connection
self:: ......
<?php
// ½«Êý×éת»»³ÉJson¸ñʽ£¬ÖÐÎÄÐèÒª½øÐÐURL±àÂë´¦Àí
function Array2Json($array) {
arrayRecursive($array, 'urlencode', true);
$json = json_encode($array);
$json = urldecode($json);
// extÐèÒª²»´øÒýºÅµÄboolÀàÐÍ
&n ......
¸öÈ˱ȼÛÈϿɣ¬ÏÖÔÚÊÇÓà netbean 6.8 ¹Ù·½Ìṩ²å¼þºÜÆëÈ«¡£
http://www.ibm.com/developerworks/cn/opensource/os-php-ide/
http://www.pusuo.net/2009-09-19/110884581.html
ÔÙÓбȽϹØ×¢vs 2010µÄÕýʽ°æ£¬ÏëÒªºÍvs.net£¬ÔÀ´Êǰ²×°ÔÚvs2008 ÒÔÉϰ汾µÄ£¬ÏÖÔÚ²»ÖªµÀÊDz»ÊÇ¿ÉÒÔÕûºÏµ½vs 2010
Èç¹û¿ÉÒÔÕûºÏµÄ»°£¬ÄÇôΠ......
phpÓʼþ¶ÁÈ¡£º
³ÌÐò¿ª·¢µÄ˼·£ºmailÎļþ£ºÏÈÁ¬½Óµ½pop3£¬¶ÁÈ¡Óû§µÄÓʼþÁÐ±í£¬ÅжÏÓʼþÊÇ·ñ¶ÁÈ¡¹ý£¬Èç¹ûû¶ÁÈ¡¹ý¾Í°ÑÓʼþ¼Óµ½ÖÐתµÄÊý¾Ý¿âÖС£get_mail£¨£©º¯Êý£¬¶ÁÈ¡Êý¾Ý¿âÖеÄÓʼþÁÐ±í£¬¶ÁÍêºó¶ÔÊý¾Ý¿â½øÐÐÇå³ý¡£ÒÔ±ãÄÜÒ»Ö±¶ÁÈ¡µÄ¶¼ÊÇеÄÓʼþ¡£
´úÂë³ÌÐò£ºmailÎļþ£º
header("content-type:text/html; charset=utf-8 ......
1.Èç¹ûÒ»¸ö·½·¨Äܱ»¾²Ì¬£¬ÄǾÍÉùÃ÷ËûΪ¾²Ì¬µÄ£¬ËÙ¶È¿ÉÌá¸ß1/4;
¡¡¡¡2.echoµÄЧÂʸßÓÚprint,ÒòΪechoûÓзµ»ØÖµ£¬print·µ»ØÒ»¸öÕûÐÍ;
¡¡¡¡3.ÔÚÑ»·Ö®Ç°ÉèÖÃÑ»·µÄ×î´ó´ÎÊý£¬¶ø·ÇÔÚÔÚÑ»·ÖÐ;
¡¡¡¡4.Ïú»Ù±äÁ¿È¥ÊÍ·ÅÄÚ´æ£¬ÌØ±ðÊÇ´óµÄÊý×é;
¡¡¡¡5.±ÜÃâʹÓÃÏñ__get, __set, __autoloadµÈħÊõ·½·¨;
¡¡¡¡6.requiere_once()±È½Ï ......