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

以上為文件目錄結(jié)構(gòu),public為程序根目錄,目的是為了安全方面的考慮,把核心程序放在外界訪問不到的地方。
本地的演示地址為:http://localhost/index.php
首先是數(shù)據(jù)庫的腳本:
/*
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開發(fā)制作一個(gè)簡單的活動日程表Calendar第二篇,請點(diǎn)擊。
以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
相關(guān)文章
PHP的new static和new self的區(qū)別與使用
這篇文章主要介紹了PHP的new static和new self的區(qū)別與使用,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2019-11-11
php筆記之:php函數(shù)range() round()和list()的使用說明
本篇文章介紹了,php函數(shù)range() round()和list()的使用說明。需要的朋友參考下2013-04-04
php中PDO方式實(shí)現(xiàn)數(shù)據(jù)庫的增刪改查
PDO是mysql數(shù)據(jù)庫操作的一個(gè)公用類了,我們不需要進(jìn)行自定類就可以直接使用pdo來操作數(shù)據(jù)庫了,但是在php默認(rèn)配置中pdo是未開啟所以我們必須先在php.ini中開啟它才可以使用。2015-05-05
PHP 計(jì)算兩個(gè)特別大的整數(shù)實(shí)例代碼
這篇文章主要介紹了PHP 計(jì)算兩個(gè)特別大的整數(shù)實(shí)例代碼,需要的朋友可以參考下2018-05-05

