phpѧϰ±Ê¼Ç£¨12£©:PHP+MYSQLÁôÑ԰壨ÏÂ
1¡¢Ìá½»±íµ¥JavascriptÑéÖ¤
<form action="" method="post" name="myform" onsubmit="return CheckPost();">
SCRIPT language=javascript>
function CheckPost()
{
if (myform.user.value=="")
{
alert("ÇëÌîдÓû§");
myform.user.focus();
return false;
}
if (myform.title.value.length<5)
{
alert("±êÌâ²»ÄÜÉÙÓÚ5¸ö×Ö·û");
myform.title.focus();
……
}
2¡¢str_replaceÌæ»»º¯Êý
Ìæ»»µÄÖµ£¬±»Ìæ»»µÄÄÚÈÝ)£»
function htmtocode($content) {
$content = str_replace("\n", "<br>", str_replace(" ", " ", $content));
return $content;
}
3¡¢htmlspecialchars ¸ñʽ»¯html
Ö÷Òª¹¦ÄÜÊǽ«HTML¸ñʽ»¯£¬·ÀÖ¹ÔÚÊä³öhtmlʱ±»ä¯ÀÀÆ÷Ö´ÐÐ
htmlspecialchars(ËùÒª¸ñʽ»¯¶ÔÏó,¶¨Ò嵥˫ÒýºÅ,±àÂë)
4¡¢md5¼ÓÃܺ¯Êý
md5( ¼ÓÃܶÔÏó )
hearder.php:
<?php
/*
* Created on 2010-1-5
* Author :CHAUVET
* Function£º±»°üº¬ÔÚÆäËûÒ³ÃæµÄÍ·²¿Ò³Ã棬ÑÝʾinclude()
*/
function ReplaceSomeWords($words){
$words=str_replace("\n","<br/>",str_replace(" "," ",$words));
return $words;
}
?>
<a href="add.php" mce_href="add.php">Ìí¼ÓÒ³Ãæ</a>|<a href="list.php" mce_href="list.php">²é¿´Ò³Ãæ</a>|<a href="add.php" mce_href="add.php">µÇÂ½Ò³Ãæ</a><br/>
<hr/>
add.php:
<html>
<head>
<title>Ìí¼ÓÒ³Ãæ</title>
<style type="text/css">
body{font-size:12px;text-align:center;}
#capation{font-size:24px;font-famliy:"»ªÎÄÐÂκ";}
</style>
<script type="text/javascript">
function ClearInputWords(){
document.myForm[0].value="";
document.myForm[1].value="";
document.myForm[2].value="ÇëÔÚ´ËÊäÈëÄúµÄÁôÑÔ£¡";
}
function CheckInput(){
&nb
Ïà¹ØÎĵµ£º
checkcode.php
====================
<?php
session_start();
$funcs = array('imagecreatetruecolor','imagecolorallocate','imagefill','imageline','imagedestroy','imagecolorallocatealpha','imageellipse','imagepng');
if(!function_exists('ob_gzhandler'))
ob_clean();
//crea ......
1.SET GLOBAL event_scheduler = ON;
2.show processlist;
3.´´½¨Ò»¸ö±í test Ö÷Òª×Ö¶Î no,name,sex,age
4.¶Ô¸Ã±í²åÈ缸ÌõÊý¾Ý
5.´´½¨´æ´¢¹ý³Ìadd_age
drop procedure if exists add_age;
delimiter|
create procedure add_age()
begin
start transaction;
update eventtest set age = age +1;
&n ......
±¾ÎÄ×ªÔØ×Ô£ºhttp://www.binzhou123.com/article/html/6038.html
±õÖÝÕ¾³¤Íø×îÐÂÏûÏ¢£º
ApacheÊÇÒ»ÖÖ¹¦ÄÜÇ¿´óµÃWeb·þÎñÆ÷¡£Èç½ñ£¬InternetÉÏÎÞÊýÔËÐÐÔÚLinuxÉϵÃApache·þÎñÆ÷ÕýΪWebÊÀ½çµÃÈÕÒæ·±ÈÙÌṩ×ÅÓÐÁ¦µÃÖ§³Å¡£±¾ÎĽ«Ïò¶ÁÕß½éÉÜÈçºÎÔÚUbuntuLinuxϵͳѸËٴApacheWeb·þÎñÆ÷¡£
¾¡¹ÜUbuntuÊÇÒ»ÖÖÐÂÐ˵à ......
×¢½â·ûºÅ:
// µ¥ÐÐ×¢½â
/* */ ¶àÐÐ×¢½â
ÒýºÅµÄʹÓÃ
’ ’ µ ......