phpÄ£°å¼¼Êõ
Õ¾µã½á¹¹
´úÂë:
Õ¾µã
©»includes
©»class.inc
©Çtemplet
©»index.htm
©Çlist.htm
©»content.htm
©Çindex.php
©»content.php
¿â½á¹¹
´úÂë:
-- Êý¾Ý¿â: `test`
-- ±íµÄ½á¹¹ `test`
CREATE TABLE `test` (
`id` smallint(3) NOT NULL auto_increment,
`name` varchar(10) NOT NULL default '',
`sex` enum('ÄÐ','Å®') NOT NULL default 'ÄÐ',
`age` smallint(2) NOT NULL default '0',
`email` varchar(20) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
--------------- class.incÎļþ --------
CODE:
<?
php
class
mycon
{
private
$myhost
;
private
$myuser
;
private
$mypwd
;
function
mycon
(
$host
=
"localhost"
,
$user
=
"root"
,
$pwd
=
""
){
$this
->
myhost
=
$host
;
$this
->
myuser
=
$user
;
$this
->
mypwd
=
$pwd
;
}
function
connect
(){
return
mysql_connect
(
$this
->
myhost
,
$this
->
myuser
,
$this
->
mypwd
);
}
}
class
templet
{
private
$source_file
;
function
get_file
(
$filename
){
$
Ïà¹ØÎĵµ£º
PHP£¬JavaºÍ.NETµÄ¹ýÈ¥£¬ÏÖÔÚºÍδÀ´
±¾ÎĶÔWeb±à³ÌÓïÑÔ½øÐÐÁËÒ»·ÌÖÂÛ£¬ÌÖÂ۵ĶÔÏóÖ÷ÒªÊÇPHP£¬JavaºÍ.NETƽ̨ÉϵÄVB.NETºÍC#¡£ÎÄÕ¶ÔËÄÖÖÓïÑÔÔÚWeb¿ª·¢ÉϵÄÌصã½øÐÐÁ˼òÂÔµÄÃèÊö£¬²¢Ö÷ÒªÔÚÐÔÄÜ·½Ãæ½øÐÐÁ˱Ƚϡ£
¡¾51CTO¾«Ñ¡ÒëÎÄ¡¿PHP£¬JavaºÍ.NETÒѾ³ÉΪÁËδÀ´ÎåÄêÄÚ³ÌÐòÔ±±ØÐë¾ß±¸µÄ¼¼ÄÜ£¬¶øÕâÈýÖÖÓïÑÔ£¨»òÕß¿ÉÒÔ³Æ֮Π......
À´Ô´£º ·¢²¼Ê±¼ä£º2009-09-18 ·¢²¼ÈË£º ä¯ÀÀ£º30ÈË´Î ×ÖÌ壺[´ó ÖРС]
¡¾1¡¿Ò³ÃæÖ®¼äÎÞ·¨´«µÝ±äÁ¿ get,post,sessionÔÚ×îеÄphp°æ±¾ÖÐ×Ô¶¯È«¾Ö±äÁ¿Êǹرյģ¬ËùÒÔÒª´ÓÉÏÒ»Ò³ÃæÈ¡µÃÌá½»¹ýÀ´µÃ±äÁ¿ÒªÊ¹ÓÃ$_GET['foo'],$_POST['foo'],$_SESSION['foo']À´µÃµ½
µ±È»Ò²¿ÉÒÔÐÞ¸Ä×Ô¶¯È«¾Ö±äÁ¿Îª¿ª(ph ......
Ä¿Ç°£¬×î³£ÓõÄÈýÖÖ¶¯Ì¬ÍøÒ³ÓïÑÔÓÐASP(Active Server Pages),JSP(Java Server Pages),
PHP (Hypertext Preprocessor)¡£
¼ò ½é
¡¡¡¡ASPÈ«ÃûActive Server & ......
Ç°ÑÔ£º
¡¡¡¡¶àÓïÑÔÍøÕ¾¿ª·¢£¬ÖصãµÄ»¹ÊÇÔÚ½â¾öÓïÑÔÖ®¼äµÄÎÊÌâ¡£
¡¡¡¡ÄÇÈçºÎ½â¾öÕâ¸öÎÊÌâÄØ?´ó¸Å¾Í·ÖÈý²½×ߣº
¡¡¡¡1.Ò³Ãæ¶àÓïÑÔ
¡¡¡¡2.Êý¾Ý¿â¶àÓïÑÔ
¡¡¡¡3.Óû§·ÃÎÊÓïÑÔͳһ
¡¡¡¡1.Ò³Ãæ¶àÓïÑÔ
¡¡¡¡ÐèÒª¿¼ÂǵÄÎÊÌ⣺
¡¡¡¡A.Óû§µÇ½ʱºò£¬×Ô¶¯Ê¶±ð×Ö·û£¬µ÷Óò»Í¬µÄÓïÑÔ°ü?
¡¡¡¡B.Óû§Çл»²»Í¬ÓïÑÔʱºò£¬µ÷Óò»Í¬µÄÓï ......
²åÈë´úÂë
<?
$action=$_GET['action'];
switch($action){
//Ìí¼Ó¼Ç¼
case"add";
$mail = trim(htmlspecialchars($_POST["mail"]));
$username = trim(htmlspecialchars($_POST["username"]));
$tel = trim(htmlspecialchars($_POST["tel"]));
$fax = trim(htmlspecialchars($_POST["fax"]));
$c ......