PHP開(kāi)發(fā)制作一個(gè)簡(jiǎn)單的活動(dòng)日程表Calendar
材料取之深入PHP與JQuery開(kāi)發(fā),這本書(shū)實(shí)際上就是講述一個(gè)活動(dòng)日程表。
此文章適合從其它語(yǔ)言(如java,C++,python等)轉(zhuǎn)到php,沒(méi)有系統(tǒng)學(xué)習(xí)php,或者是php初學(xué)者,已經(jīng)對(duì)程序有較深理解的朋友

以上為文件目錄結(jié)構(gòu),public為程序根目錄,目的是為了安全方面的考慮,把核心程序放在外界訪問(wèn)不到的地方。
本地的演示地址為:http://localhost/index.php
首先是數(shù)據(jù)庫(kù)的腳本:
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50130
Source Host : 127.0.0.1:3306
Source Database : php-jquery_example
Target Server Type : MYSQL
Target Server Version : 50130
File Encoding : 65001
Date: 2016-06-19 16:54:29
*/
CREATE DATABASE <SPAN style="color: rgb(0, 0, 255);">IF</SPAN> NOT EXISTS `php-jquery_example`
<SPAN style="color: rgb(0, 0, 255);">DEFAULT</SPAN> CHARACTER SET utf8
COLLATE utf8_unicode_ci<SPAN style="color: rgb(0, 128, 0);">;</SPAN>
SPAN style="color: rgb(0, 128, 0);"> </SPAN>
SPAN style="color: rgb(0, 128, 0);"> </SPAN>
SPAN style="color: rgb(0, 128, 0);">SET FOREIGN_KEY_CHECKS=0;</SPAN>
-- ----------------------------
-- Table structure <SPAN style="color: rgb(0, 0, 255);">for</SPAN> events
-- ----------------------------
DROP TABLE <SPAN style="color: rgb(0, 0, 255);">IF</SPAN> EXISTS `events`<SPAN style="color: rgb(0, 128, 0);">;</SPAN>
SPAN style="color: rgb(0, 128, 0);">CREATE TABLE `events` (</SPAN>
`event_id` int(11) NOT NULL AUTO_INCREMENT,
`event_title` varchar(80) COLLATE utf8_unicode_ci <SPAN style="color: rgb(0, 0, 255);">DEFAULT</SPAN> NULL,
`event_desc` text COLLATE utf8_unicode_ci,
`event_start` timestamp NOT NULL <SPAN style="color: rgb(0, 0, 255);">DEFAULT</SPAN> '0000-00-00 00:00:00',
`event_end` timestamp NOT NULL <SPAN style="color: rgb(0, 0, 255);">DEFAULT</SPAN> '0000-00-00 00:00:00',
PRIMARY KEY (`event_id`),
KEY `event_start` (`event_start`)
) ENGINE=MyISAM AUTO_INCREMENT=3 <SPAN style="color: rgb(0, 0, 255);">DEFAULT</SPAN> CHARSET=utf8 COLLATE=utf8_unicode_ci<SPAN style="color: rgb(0, 128, 0);">;</SPAN>
SPAN style="color: rgb(0, 128, 0);"></SPAN>
SPAN style="color: rgb(0, 128, 0);">-- ----------------------------</SPAN>
-- Records of events
-- ----------------------------
INSERT INTO `events` VALUES ('1', 'New Year&<SPAN style="color: rgb(0, 128, 0);">;#039;s Day', 'Happy New Year!', '2010-01-01 00:00:00', '2010-01-01 23:59:59');</SPAN>
INSERT INTO `events` VALUES ('2', 'Last Day of January', 'Last day of the month!Yay!', '2010-01-31 00:00:00', '2010-01-31 23:59:59')<SPAN style="color: rgb(0, 128, 0);">;</SPAN>
PHP開(kāi)發(fā)制作一個(gè)簡(jiǎn)單的活動(dòng)日程表Calendar第二篇,請(qǐng)點(diǎn)擊。
以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
相關(guān)文章
PHP的new static和new self的區(qū)別與使用
這篇文章主要介紹了PHP的new static和new self的區(qū)別與使用,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2019-11-11
PHP mkdir()無(wú)寫(xiě)權(quán)限的問(wèn)題解決方法
這篇文章主要介紹了PHP mkdir()無(wú)寫(xiě)權(quán)限的問(wèn)題解決方法,對(duì)umask做了詳細(xì)解釋以及mkdir()后沒(méi)寫(xiě)權(quán)限的解決方法,需要的朋友可以參考下2014-06-06
php筆記之:php函數(shù)range() round()和list()的使用說(shuō)明
本篇文章介紹了,php函數(shù)range() round()和list()的使用說(shuō)明。需要的朋友參考下2013-04-04
php中PDO方式實(shí)現(xiàn)數(shù)據(jù)庫(kù)的增刪改查
PDO是mysql數(shù)據(jù)庫(kù)操作的一個(gè)公用類了,我們不需要進(jìn)行自定類就可以直接使用pdo來(lái)操作數(shù)據(jù)庫(kù)了,但是在php默認(rèn)配置中pdo是未開(kāi)啟所以我們必須先在php.ini中開(kāi)啟它才可以使用。2015-05-05
PHP 計(jì)算兩個(gè)特別大的整數(shù)實(shí)例代碼
這篇文章主要介紹了PHP 計(jì)算兩個(gè)特別大的整數(shù)實(shí)例代碼,需要的朋友可以參考下2018-05-05
YII Framework的filter過(guò)濾器用法分析
這篇文章主要介紹了YII Framework的filter過(guò)濾器用法,結(jié)合實(shí)例形式分析了filter過(guò)濾器的功能,使用技巧與相關(guān)注意事項(xiàng),需要的朋友可以參考下2016-03-03

