国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Home php教程 php手冊 初學(xué)CAKEPHP 基礎(chǔ)教程

初學(xué)CAKEPHP 基礎(chǔ)教程

Jun 13, 2016 pm 12:20 PM
cakephp g go team exist Base develop try to find Tutorial yes of system USA material

CAKEPHP是美國團(tuán)隊(duì)開發(fā)的一個(gè)系統(tǒng),大家在找CAKEPHP資料的時(shí)候去GOOGLE搜索的資料精確些!或者去官方網(wǎng)站上去查!官方網(wǎng)址是www.cakephp.org!

?? 首先我們來討論一下為什么要用CAKEPHP!cakephp繼承了rails的優(yōu)點(diǎn)!開發(fā)效率高!易于維護(hù)!組件多!http://bakery.cakephp.org/categories/view/5這些組件足夠滿足你系統(tǒng)的需要!有時(shí)間大家去這個(gè)網(wǎng)站上看看!為界面程序易于開發(fā)!更改模板為html格式!經(jīng)過修改后的支持ctp和htm兩種格式!

? 還有兩個(gè)系統(tǒng)!分別是Symfony與Fleaphp后!Symfony是國外的.Fleaphp是國外的一個(gè)框架!經(jīng)過選擇之后!決定學(xué)習(xí)并使用cakephp!

? 我們來了解一下cakephp的結(jié)構(gòu),這個(gè)是cakephp的首目錄,大家可以看到這個(gè)app文件!以后大家寫代碼就寫在這個(gè)文件里面,cake文件是庫,底庫!vendors也是庫!是第三方庫!和app里面的vendors是對應(yīng)的!.htaccess是沖寫規(guī)則!在里面是一些正則表達(dá)式!下面我來看APP下面的文件內(nèi)容!我們來一一看下這些文件是做什么用的!這個(gè)是app下面的文件,這些文件都是我們要經(jīng)常設(shè)置的文件!繼續(xù)看config里面的這些文件!數(shù)據(jù)庫一般放在sql里面!打開bootstap.php文件!這個(gè)文件你可以設(shè)置一些常量!比如說皮膚切換功能!多語言也需要在這里面設(shè)置默認(rèn)的語言!打開core.php,主要是我們經(jīng)常會在這里做一些修改!這個(gè)地方!當(dāng)你程序出錯(cuò)檢查不出錯(cuò)誤的時(shí)候,你就用2,當(dāng)你確定沒錯(cuò)誤的時(shí)候,可以關(guān)掉debug,改2為0!這個(gè)是保存session!session的保存格式有3個(gè),第一是保存到數(shù)據(jù)庫,可以設(shè)置到服務(wù)器上!再就是可以保存到cake文件中的PHP文件!我們來看這個(gè)文件!在我們下載新的cakephp源程序之后!我們戶發(fā)現(xiàn)兩個(gè)錯(cuò)誤!第一個(gè)就是這個(gè)文件!在我們下載新的文件的以后!只需要在在后面那個(gè)值里面隨便敲些代碼進(jìn)去!只要和原來的不一樣就OK了!第二個(gè)錯(cuò)誤就是數(shù)據(jù)庫的連接!那么我們接下來看數(shù)據(jù)庫應(yīng)該怎么連接!
根據(jù)你自己的設(shè)置改數(shù)據(jù)庫的連接!我們再來看一下app文件夾下面的views,views中的elements是一個(gè)頁面的部分!頁面的主題需要在layouts這個(gè)文件夾里面建一個(gè)result.html如果有錯(cuò)誤的頁面,就是顯示錯(cuò)誤的頁面!比如說404錯(cuò)誤!就寫在errors這個(gè)文件夾下面!pages是一些靜態(tài)頁面!users必須和controllers的action想對應(yīng),webroot是根目錄!我們把上傳的文件啊!什么JS文件啊!CSS文件啊!FCKEDITOR都需放在這個(gè)文件夾中去!controllers的components是放組件的地方@就是我們在網(wǎng)上下的一些組件!

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

Undress AI Tool

Undress AI Tool

Undress images for free

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.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

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)

CakePHP Working with Database CakePHP Working with Database Sep 10, 2024 pm 05:25 PM

Working with database in CakePHP is very easy. We will understand the CRUD (Create, Read, Update, Delete) operations in this chapter.

CakePHP Project Configuration CakePHP Project Configuration Sep 10, 2024 pm 05:25 PM

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

Huawei's Qiankun ADS3.0 intelligent driving system will be launched in August and will be launched on Xiangjie S9 for the first time Huawei's Qiankun ADS3.0 intelligent driving system will be launched in August and will be launched on Xiangjie S9 for the first time Jul 30, 2024 pm 02:17 PM

On July 29, at the roll-off ceremony of AITO Wenjie's 400,000th new car, Yu Chengdong, Huawei's Managing Director, Chairman of Terminal BG, and Chairman of Smart Car Solutions BU, attended and delivered a speech and announced that Wenjie series models will be launched this year In August, Huawei Qiankun ADS 3.0 version was launched, and it is planned to successively push upgrades from August to September. The Xiangjie S9, which will be released on August 6, will debut Huawei’s ADS3.0 intelligent driving system. With the assistance of lidar, Huawei Qiankun ADS3.0 version will greatly improve its intelligent driving capabilities, have end-to-end integrated capabilities, and adopt a new end-to-end architecture of GOD (general obstacle identification)/PDP (predictive decision-making and control) , providing the NCA function of smart driving from parking space to parking space, and upgrading CAS3.0

CakePHP Logging CakePHP Logging Sep 10, 2024 pm 05:26 PM

Logging in CakePHP is a very easy task. You just have to use one function. You can log errors, exceptions, user activities, action taken by users, for any background process like cronjob. Logging data in CakePHP is easy. The log() function is provide

CakePHP Creating Validators CakePHP Creating Validators Sep 10, 2024 pm 05:26 PM

Validator can be created by adding the following two lines in the controller.

CakePHP Services CakePHP Services Sep 10, 2024 pm 05:26 PM

This chapter deals with the information about the authentication process available in CakePHP.

CakePHP Routing CakePHP Routing Sep 10, 2024 pm 05:25 PM

In this chapter, we are going to learn the following topics related to routing ?

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

To work on file upload we are going to use the form helper. Here, is an example for file upload.

See all articles