Áª¶¯ÏÂÀÁбí php
ÕÒµ½Ò»¸öÄÜÓÃµÄ ·ÖÏí¸øÄã°É
¸ÕÒѾÔÚ±¾»ú×ö¹ýÈÏÕæ²âÊÔ£¬¾ø¶ÔÎÞÎÊÌâ
£¨±í½á¹¹:
id ±íID£¨Î¨Ò»£©
title ¸÷Àà±êÌâ
flid Àà±ðµÄID £¨´óÀàΪ1 ÖÐÀàΪ2 СÀàΪ3£©
pid ÉÏÀàµÄID£¨´óÀà¾Í¸ú´óÀ࣬Ìá½»ÖÐÀàµÄʱºòÕâµØ·½Ð´´óÀàµÄID£¬ÌύСÀàµÄʱºòдÖÐÀàµÄID£© £©
<?php
$link=mysql_connect("localhost","root","root") or die("Êý¾Ý¿â·þÎñÆ÷Á¬½Ó´íÎó".mysql_error());
mysql_select_db("sanji",$link) or die("Êý¾Ý¿â·ÃÎÊ´íÎó".mysql_error());
mysql_query("set character set gb2312");
mysql_query("set names gb2312");
?>
<html>
<head>
<title>ÏÂÀ¿òÁ¬¶¯</title>
</head>
<body>
<script language="JavaScript">
<!--
var subcat = new Array();
<?
$i=0;
$sql="select * from sanji where flid=2";
$query=mysql_query($sql,$link);
while($arr=mysql_fetch_array($query))
{
echo "subcat[".$i++."] = new Array('".$arr["pid"]."','".$arr["title"]."','".$arr["id"]."');\n";
}
?>
var subcat2 = new Array();
<?
$i=0;
$sql="select * from sanji where flid=3";
$query=mysql_query($sql,$link);
while($arr=mysql_fetch_array($query))
{
echo "subcat2[".$i++."] = new Array('".$arr["pid"]."','".$arr["title"]."','".$arr["id"]."');\n";
}
?>
function changeselect1(locationid)
{
document.form1.s2.length = 0;
document.form1.s2.options[0] = new Option('==ÇëÑ¡Ôñ==','');
for (i=0; i<subcat.length; i++)
{
if (subcat[i][0] == locationid)
{document.form1.s2.options[document.form1.s2.length] = new Option(subcat[i][1], subcat[i][2]);}
}
}
function changeselect2(locationid)
{
document.form1.s3.length = 0;
document.form1.s3.options[0] = new Option('==ÇëÑ¡Ôñ==','');
for (i=0; i<subcat2.length; i++)
{
if (subcat2[i][0] == locationid)
{document.form1.s3.options[document.form1.s3.length] = new Option(subcat2[i][1], subcat2[i][2]);}
}
}
//-->
</script>
Èý¼¶Áª¶¯£º<BR>
<form name="form1">
<select name="s1" onChange="changeselect1(this.value
Ïà¹ØÎĵµ£º
PHP ·¢ËÍÓʼþ
×÷Õß:w3pop.com ·Òë/ÕûÀí:w3pop.com ·¢²¼:2007-04-28 ÐÞ¸Ä:2007-06-17 ä¯ÀÀ:14208 :: ::
PHP Sessions
PHP allows you to send e-mails directly from a script.
PHPÔÊÐíÄãͨ¹ý½Å±¾Ö±½Ó·¢ËÍe-mail¡£
The PHP mail() Function
PHP mail()º¯Êý
The PHP m ......
//
dirname()
// Returns directory name component of path
basename()
// Returns filename component of path
pathinfo()
// Returns information about a file path;
// pathinfo() returns an associative array containing information about path .
parse_url()
// Parse a URL and return its comp ......
1¡¢²¼¶ûÖµ£ºfalse(0,¿Õ°×,null); true(-1,·Ç0Öµ)£» 2¡¢echo '$s'Êä³öÄÚÈÝÊÇ $s;
Èç¹û""ÀïÃæ°üº¬ÁË$s»òÕß{$s}£¬ÄÇô½«ÏÔʾµÄ±äÁ¿µÄÖµ¡£ÍƼöʹÓÃ{$s}µÄ·½Ê½¡£
ʹÓÃ""ʱºò£¬Èç¹ûÔÚ""ÀïÃæ»¹ÒªÊ¹ÓÃ"",¾Í±ØÐëÓÃ\À´×ªÒå,ÀýÈ磺 echo "\"sss\""; 3¡¢ ......
ǰÑÔ£º
¡¡¡¡FCKeidtorÊǸö¹úÍâµÄ¶àÓïÑÔ±à¼Æ÷£¬Äã¿ÉÒÔ¶ÔÆäÅäÖÃÎļþ½øÐмòµ¥ÐÞ¸Äʹ֧֮³ÖĿǰ³£ÓÃWeb¿ª·¢ÓïÑÔµÄÓ¦Óã¬ÏÂÃæÎҾͽ²½²FCKeditorµÄ×îа汾2.4.2ÔÚphpµÄ¾ßÌåÅäÖùý³Ì£¬Óв»×ãºÍ³ö´íµÄµØ·½£¬»¶ÓÖ¸Õý¡£
¾«¼ò£º
¡¡¡¡ÕýÒòΪÕâ¸ö±à¼Æ÷ÊÇÖ§³Ö¶àÓïÑԵģ¬ËùÒÔÊ×ÏÈÎÒÃÇÕë¶ÔʹÓÃ¶ÔÆä×öÏàÓ¦µÄÈßÓàÎļþɾ³ý¡£
¡¡¡ ......
MYSQL,·ÖÒ³ÀàÊÇдPHP´úÂë×î³£ÓõöÀà¡£
½ñÌì¿´PHP100µÄÊÓÆµ£¬Ô½ÓÃÔ½·¢ÏÖÀïÃæÁ½¸öÀàºÃÇ¿´ó£¬ËäÈ»¸Ð¾õ»¹ÊÇÓоÖÏÞÐÔ£¬µ«ÊÇËüµÄд·¨ÒѾºÜ³ÉÊìÁË¡£
Ò»¸öÊÇMYSQL£¬Ò»¸öÊÇ·ÖÒ³Àà¡£
MYSQL£º
<?php
class mysql {
private $db_host; //Êý¾Ý¿âÖ÷»ú
private $db_user; //Êý¾Ý¿âÓû§Ãû
private $db_pwd; //Êý¾Ý ......