挑戰(zhàn)最棒的留言本的源碼(一)
Jun 08, 2016 pm 05:32 PM哈哈,很開心,做了好些時(shí)候的留言本總算可以發(fā)表了...
阿,希望能大家喜歡,不喜歡也不要緊,但是,一定有不喜歡的理由,,煩請(qǐng)一定告知!!!
謝謝!!!
本留言本從一開始的目標(biāo)就是""挑戰(zhàn)最棒的留言本""!!!我想"沒有做不到的,只是看有沒有必要"!!!
假如你的建議很好,我一定做到你的要求為止,我的目標(biāo):"做一個(gè)很棒的程序員".
此留言本的優(yōu)點(diǎn)和缺點(diǎn):
-------------------------------------------------------------------
這可能是最重要的了.哈哈!!!
優(yōu)點(diǎn):
該留言本最大的優(yōu)點(diǎn)是,換行.實(shí)現(xiàn)了用戶換行,(保持原形,中國(guó)人的同學(xué)錄的換行是安一定字?jǐn)?shù)的,也就是說不管你的換行,統(tǒng)統(tǒng)都他給你換行.這樣要是想貼文本圖形的話,就存在問題了.)而現(xiàn)在大部分的留言本都沒有實(shí)現(xiàn)自動(dòng)換行,也就是說它不管你一句寫多少個(gè)字符,它都會(huì)在一行顯示,這樣要是有一個(gè)留言沒換行的話,留言本就會(huì)變的很難看,窗口下面的行條就會(huì)好長(zhǎng),,破壞了葉面的美觀!!!.
到今天為止,我還沒發(fā)現(xiàn)能同時(shí)解決這兩個(gè)問題的留言,這也是我寫這留言本的原因所在.
包括oso的論壇,也是不換行的,不信你去留言試試,寫一條很長(zhǎng)的不回車的字符,這樣它的葉面馬上就出現(xiàn)問題了.(我和oso提過這問題,不知道改了沒有!)
我寫了個(gè)computer_message($msg);的函數(shù)解決了這問題,可以看config.php文件中的源瑪.
還有分頁:通過兩種方式來察看,一是:往前,往后顯示留言,另一種是:安頁數(shù)顯示.
還有現(xiàn)在版主可以方便的通過下面的連接來刪除和恢復(fù),當(dāng)然要輸入密碼.
缺點(diǎn):
當(dāng)然有了,要實(shí)事求是,就是頁面的美化工作做的還不是很夠,雖然覺的很必要,但由于時(shí)間的關(guān)系總覺的這是外面的東西,可以先拖一下,當(dāng)然只要有一點(diǎn)HTML知識(shí)的都可以很方便的修改.
還有就是未知的BUG了!哈哈!!!
下載點(diǎn),和樣本在http://little.oso.com.cn中可以找到?。?!
因?yàn)檎f明檔是在linux下寫的,所以要用寫字板打開readme.txt
不要用記事本,要不然會(huì)亂碼!??!
下面是配置說明:
--------------------------------------------------------------------
為了配置的方便,重新整理了代碼,現(xiàn)在已經(jīng)把全部的需要設(shè)置的參數(shù)都放在
config.php文件里了,配置起來應(yīng)該很簡(jiǎn)單,里面有詳悉的說明.
目標(biāo):在十分種內(nèi)搞定你的留言本!!!
1: 建立一個(gè)數(shù)據(jù)庫(要主頁提供數(shù)據(jù)庫空間)
一般象oso的有phpMyAdmin開放源瑪?shù)那岸?創(chuàng)建以來很簡(jiǎn)單的.
取好名字后,記得把config.php 的$db_name改成這個(gè)名字
2: 建立留言表(等下把config.php的$table_name改成這里你起的名字).
結(jié)構(gòu)為:
key_liuyan int(11) auto_increment primary key, //主建,自動(dòng)增加
nikename varchar(20) null // 昵稱
subject varchar(100) null // 留言主題
date_created varchar(19) // 留言時(shí)間
ip_address varchar(15) // 留言人的IP地址
message mediumtext null // 留言信息
email_address varchar(50) null // 留言人的e-mail地址
zhuye_address varchar(50) null // 留言人的主頁地址
huifu_biaozi int(1) default 0 // 版主回復(fù)標(biāo)志
huifu mediumtext null // 版主回復(fù)內(nèi)容
oicq varchar(20) null // 留言人的OICQ號(hào)碼
可以用如下的SQL來完成!!!(本人測(cè)試通過,記得把yourtable_name改成好記點(diǎn)的,
當(dāng)然不改也行阿)
create table your_liuyan_table(
key_liuyan int(11) auto_increment primary key,
nikename varchar(20) null,
subject varchar(100) null,
date_created varchar(19) ,
ip_address varchar(15),
message mediumtext null,
email_address varchar(50) null,
zhuye_address varchar(50) null,
huifu_biaozi int(1) default 0 ,
huifu mediumtext null,
oicq varchar(20) null
)
3: 建立控制表:(同樣要把這里起的名字放到config.php的$table_name_control里去)
結(jié)構(gòu)如下:
leibie varchar(20) primary key,
value varchar(20) null
也可以用下面的SQL語句:
create table your_control_table(
leibie varchar(20) primary key,
value varchar(20) null
)
因?yàn)檫@是你的控制表,所以要自己加入控制記錄兩條;
SQL語句為:
插入刪除密碼:
insert into your_control_tble(
leibie,
value)
values
(delete,'1332');
插入回復(fù)密碼:
insert into your_control_tble(
leibie,
value)
values
(huifu,'1332');
這樣放進(jìn)去的密碼為:123,用戶名為空!
怎么計(jì)算密碼和插入的值的關(guān)系呢?
是這樣的,你的密碼 ,如123 把三位數(shù)上的各位加起來,等于6,然后把6乘以222就是密碼值!!!
6*222=1332.
知道了這關(guān)系,當(dāng)然你可以改成其它的密碼了.
不過用戶名要為空,,,
這實(shí)行的簡(jiǎn)單加密的原理可以參照主頁 http://cxg168.126.com 的三位數(shù).
4: 一切完成,然后只要把除了readme.txt外的文件上傳就行了.

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The difference between null and NULL in C language is: null is a macro definition in C language, usually used to represent a null pointer, which can be used to initialize pointer variables, or to determine whether the pointer is null in a conditional statement; NULL is a macro definition in C language A predefined constant in , usually used to represent a null value, used to represent a null pointer, null pointer array or null structure pointer.

In JavaScript, both undefined and null represent the concept of "nothing": 1. undefined represents an uninitialized variable or a non-existent property. When a variable is declared but no value is assigned to it, the value of the variable is undefined , when accessing properties that do not exist in the object, the returned value is also undefined; 2. null represents an empty object reference. In some cases, the object reference can be set to null to release the memory it occupies.

The difference between null and undefined is: 1. Semantic meaning; 2. Usage scenarios; 3. Comparison with other values; 4. Relationship with global variables; 5. Relationship with function parameters; 6. Nullability check; 7. Performance considerations; 8. Performance in JSON serialization; 9. Relationship with types. Detailed introduction: 1. Semantic meaning, null usually means knowing that this variable will not have any valid object value, while undefined usually means that the variable has not been assigned a value, or the object does not have this attribute; 2. Usage scenarios, etc.

Usage: 1. Initialize the reference type variable to null, indicating that the variable does not currently point to any object; 2. Set the reference type variable to null, which can release the memory space of the object referenced by the variable and help the garbage collector to recover This object; 3. Use null to check whether a reference is empty. You can avoid the occurrence of NullPointerException by judging whether the reference is null. 4. Use null in conditional judgment to judge whether a reference is empty.

Both null and undefined indicate a lack of value or an undefined state. Depending on the usage scenario, there are some guiding principles for choosing to use null or undefined: 1. When you need to clearly indicate that a variable is empty or invalid, you can use null; 2. When a variable has been declared but not yet assigned a value, it will be set to undefined by default; 3. When you need to check whether a variable is empty or undefined, use the strict equality operator "===" to determine whether the variable is null or undefined. .

php提交表單通過后,彈出的對(duì)話框怎樣在當(dāng)前頁彈出php提交表單通過后,彈出的對(duì)話框怎樣在當(dāng)前頁彈出而不是在空白頁彈出?想實(shí)現(xiàn)這樣的效果:而不是空白頁彈出:------解決方案--------------------如果你的驗(yàn)證用PHP在后端,那么就用Ajax;僅供參考:HTML code

Basic table Before developing the table component, first think about what style of API to use. Because the author uses element in production work, the styles of the previous components are similar to element, but this time I do not plan to use the element style. , I plan to change it and display it directly: We expect users to use it like this: constdataList=[{id:1,name:'"JavaEE Enterprise Application Practice"',author:'dev1ce',price:'10.22',desc:&# 3

During the use of MySQL, dates are generally stored in datetime, timestamp and other formats. However, sometimes due to special needs or historical reasons, the date is stored in varchar format. So how should we process the date data in varchar format? ? Use function: STR_TO_DATE(str,format) The STR_TO_DATE(str,format) function is the inverse function of the DATE_FORMAT() function. It takes a string str and a format string format. STR_TO_DATE() returns a DATETIME value if the format string contains date and time components, or if the word
