Home Backend Development PHP Tutorial 挑战最棒的留言本的源码(一)_PHP

挑战最棒的留言本的源码(一)_PHP

Jun 01, 2016 pm 12:29 PM
null varchar challenge Source code message

留言本的使用说明


哈哈,很开心,做了好些时候的留言本总算可以发表了...
阿,希望能大家喜欢,不喜欢也不要紧,但是,一定有不喜欢的理由,,烦请一定告知!!!
谢谢!!!

本留言本从一开始的目标就是""挑战最棒的留言本""!!!我想"没有做不到的,只是看有没有必要"!!!

如果你的建议很好,我一定做到你的要求为止,我的目标:"做一个很棒的程序员".



此留言本的优点和缺点:
-------------------------------------------------------------------
这可能是最重要的了.哈哈!!!

优点:

该留言本最大的优点是,换行.实现了用户换行,(保持原形,中国人的同学录的换行是安一定字数的,也就是说不管你的换行,统统都他给你换行.这样要是想贴文本图形的话,就存在问题了.)而现在大部分的留言本都没有实现自动换行,也就是说它不管你一句写多少个字符,它都会在一行显示,这样要是有一个留言没换行的话,留言本就会变的很难看,窗口下面的行条就会好长,,破坏了叶面的美观!!!.

到今天为止,我还没发现能同时解决这两个问题的留言,这也是我写这留言本的原因所在.

包括oso的论坛,也是不换行的,不信你去留言试试,写一条很长的不回车的字符,这样它的叶面马上就出现问题了.(我和oso提过这问题,不知道改了没有!)

我写了个computer_message($msg);的函数解决了这问题,可以看config.php文件中的源玛.

还有分页:通过两种方式来察看,一是:往前,往后显示留言,另一种是:安页数显示.

还有现在版主可以方便的通过下面的连接来删除和恢复,当然要输入密码.

缺点:

当然有了,要实事求是,就是页面的美化工作做的还不是很够,虽然觉的很必要,但由于时间的关系总觉的这是外面的东西,可以先拖一下,当然只要有一点HTML知识的都可以很方便的修改.

还有就是未知的BUG了!哈哈!!!


下载点,和样本在http://little.oso.com.cn中可以找到!!!


因为说明档是在linux下写的,所以要用写字板打开readme.txt
不要用记事本,要不然会乱码!!!

下面是配置说明:
--------------------------------------------------------------------
为了配置的方便,重新整理了代码,现在已经把全部的需要设置的参数都放在
config.php文件里了,配置起来应该很简单,里面有详悉的说明.

目标:在十分种内搞定你的留言本!!!

1: 建立一个数据库(要主页提供数据库空间)

一般象oso的有phpMyAdmin开放源玛的前端.创建以来很简单的.

取好名字后,记得把config.php 的$db_name改成这个名字

2: 建立留言表(等下把config.php的$table_name改成这里你起的名字).

结构为:
key_liuyan int(11) auto_increment primary key, //主建,自动增加
nikename varchar(20) null // 昵称
subject varchar(100) null // 留言主题
date_created varchar(19) // 留言时间
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 // 版主回复标志
huifu mediumtext null // 版主回复内容
oicq varchar(20) null // 留言人的OICQ号码

可以用如下的SQL来完成!!!(本人测试通过,记得把yourtable_name改成好记点的,
当然不改也行阿)

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里去)

结构如下:

leibie varchar(20) primary key,
value varchar(20) null

也可以用下面的SQL语句:

create table your_control_table(

leibie varchar(20) primary key,
value varchar(20) null
)

因为这是你的控制表,所以要自己加入控制记录两条;

SQL语句为:

插入删除密码:

insert into your_control_tble(
leibie,
value)
values
(delete,'1332');

插入回复密码:

insert into your_control_tble(
leibie,
value)
values
(huifu,'1332');

这样放进去的密码为:123,用户名为空!

怎么计算密码和插入的值的关系呢?

是这样的,你的密码 ,如123 把三位数上的各位加起来,等于6,然后把6乘以222就是密码值!!!

6*222=1332.

知道了这关系,当然你可以改成其它的密码了.

不过用户名要为空,,,


这实行的简单加密的原理可以参照主页 http://cxg168.126.com 的三位数.


4: 一切完成,然后只要把除了readme.txt外的文件上传就行了.



如还有什么问题请联系我.


下面是联系我的方法(意见返回):
--------------------------------------------------------------------
?我的留言本: http://little.oso.com.cn
我的OICQ: 873221
我的e-mail: cxg168@sohu.com

---------------------------------------------------------------------

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Towards Verifiable AI: Five Challenges of Formal Methods Towards Verifiable AI: Five Challenges of Formal Methods Apr 09, 2023 pm 02:01 PM

Artificial intelligence is a computing system that attempts to imitate human intelligence, including some human functions that are intuitively related to intelligence, such as learning, problem solving, and rational thinking and action. Broadly interpreted, the term AI covers many closely related fields such as machine learning. Systems that make heavy use of AI are having significant social impacts in areas such as healthcare, transportation, finance, social networks, e-commerce, and education. This growing social impact has also brought with it a series of risks and concerns, including errors in artificial intelligence software, cyberattacks and artificial intelligence system security. Therefore, the issue of verification of AI systems, and the broader topic of trustworthy AI, has begun to attract attention from the research community. “Verifiable AI” has been confirmed

Implementing Machine Learning Algorithms in C++: Common Challenges and Solutions Implementing Machine Learning Algorithms in C++: Common Challenges and Solutions Jun 03, 2024 pm 01:25 PM

Common challenges faced by machine learning algorithms in C++ include memory management, multi-threading, performance optimization, and maintainability. Solutions include using smart pointers, modern threading libraries, SIMD instructions and third-party libraries, as well as following coding style guidelines and using automation tools. Practical cases show how to use the Eigen library to implement linear regression algorithms, effectively manage memory and use high-performance matrix operations.

Application practice of Python in software source code protection Application practice of Python in software source code protection Jun 29, 2023 am 11:20 AM

As a high-level programming language, Python language is easy to learn, easy to read and write, and has been widely used in the field of software development. However, due to the open source nature of Python, the source code is easily accessible to others, which brings some challenges to software source code protection. Therefore, in practical applications, we often need to take some methods to protect Python source code and ensure its security. In software source code protection, there are a variety of application practices for Python to choose from. Below are some common

How to leave a message on Xianyu How to leave a message on Xianyu and chat privately How to leave a message on Xianyu How to leave a message on Xianyu and chat privately Mar 23, 2024 am 09:10 AM

Xianyu APP is a super second-hand trading software. It allows everyone to choose products here at will, or publish their own products for sale. There is no problem. Everything can be realized here. When you use it here When using the Xianyu APP, everyone needs to communicate in a timely manner by leaving messages to get more information and help you sell or buy goods better. It is relatively convenient and is aimed at those who still don’t know how to leave messages on Xianyu. For my friends, I have now brought you specific Xianyu message tutorials. I hope it will be helpful to you. Xianyu message tutorial: 1. First, open Xianyu. 2. Then enter the interface and click on a product. 3. Then in the interface that appears, slide up and click

AIGCx Art: Blue Ocean or Challenge? See how the art world embraces artificial intelligence? AIGCx Art: Blue Ocean or Challenge? See how the art world embraces artificial intelligence? May 29, 2023 pm 02:46 PM

In the past, the works of art masters had to undergo a long and painstaking process of imitation and reproduction before they could be retained or sold to unsuspecting buyers. Now with the help of AIGC technology, users can create works by selecting a specific genre, as if they can imitate the master's work in an instant. The existing art image database of the MetaVision digital collection "AI Stan" series has become a data training source for AI, enabling it to learn and understand the characteristics, style and content of artistic creation. After data training, the AI ​​model is built. These models, often based on deep learning techniques, are able to analyze incoming data and generate new works of art. When creating art, users need to input or adjust parameters to control the results of creation. After the AI ​​model generates the artwork, use

An easy way to join a challenge on TikTok An easy way to join a challenge on TikTok Mar 28, 2024 pm 03:10 PM

1. First open Douyin and click #challenge# directly below the video. 2. You can also click [Search]. 3. Enter the challenge to search and select the challenge you want to participate in. 4. Finally, click [Participate].

How to view the source code of tomcat in idea How to view the source code of tomcat in idea Jan 25, 2024 pm 02:01 PM

Steps to view tomcat source code in IDEA: 1. Download Tomcat source code; 2. Import Tomcat source code in IDEA; 3. View Tomcat source code; 4. Understand the working principle of Tomcat; 5. Precautions; 6. Continuous learning and updating ; 7. Use tools and plug-ins; 8. Participate in the community and contribute. Detailed introduction: 1. Download the Tomcat source code. You can download the source code package from the official website of Apache Tomcat. Usually these source code packages are in ZIP or TAR format, etc.

Challenges and Opportunities of PHP Microservice Architecture: Exploring Uncharted Territories Challenges and Opportunities of PHP Microservice Architecture: Exploring Uncharted Territories Feb 19, 2024 pm 07:12 PM

PHP microservices architecture has become a popular way to build complex applications and achieve high scalability and availability. However, adopting microservices also brings unique challenges and opportunities. This article will delve into these aspects of PHP microservices architecture to help developers make informed decisions when exploring uncharted territory. Challenging distributed system complexity: Microservices architecture decomposes applications into loosely coupled services, which increases the inherent complexity of distributed systems. For example, communication between services, failure handling, and network latency all become factors to consider. Service governance: Managing a large number of microservices requires a mechanism to discover, register, route and manage these services. This involves building and maintaining a service governance framework, which can be resource-intensive. Troubleshooting: in microservices

See all articles