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

Home Backend Development PHP Tutorial windows下cakephp的設(shè)立各工程

windows下cakephp的設(shè)立各工程

Jun 13, 2016 pm 12:08 PM
app cakephp include root

windows下cakephp的設(shè)置各工程

http://book.cakephp.org/2.0/zh/installation/advanced-installation.html

?

這個(gè)url里面說(shuō)的很明白,但是下面的說(shuō)明是以linux為例子進(jìn)行說(shuō)明的,在win里要稍微注意以下

寫道

CakePHP 核心類庫(kù),位于 /lib/Cake 目錄。
應(yīng)用程序的代碼,位于 /app 目錄。
應(yīng)用程序的 webroot,通常位于 /app/webroot 目錄。

有三個(gè)常量需要修改: ROOT 、 APP_DIR 和 CAKE_CORE_INCLUDE_PATH。

ROOT 應(yīng)當(dāng)設(shè)置為包含你的 app 文件夾的目錄路徑。
APP_DIR 應(yīng)當(dāng)設(shè)置為 app 目錄的目錄名稱(譯注:即不包含前面的路徑)。
CAKE_CORE_INCLUDE_PATH 應(yīng)當(dāng)設(shè)置為 CakePHP 類庫(kù)目錄的路徑。

?

譬如?

寫道
if (!defined('ROOT')) {
define('ROOT', dirname(dirname(dirname(__FILE__))));
}

?

意味著root的路徑是此文件的父 父 父 文件夾

?

實(shí)際情況下,我的index.php是

C:\USBWebserverv8.5\root\myRootCakephp/index.php

設(shè)置的就是,意味著是 父 父文件夾

?

寫道
if (!defined('ROOT')) {
define('ROOT', dirname(dirname(__FILE__)));
}

?

同時(shí),我的app和cake放在了

C:\USBWebserverv8.5\root\cakephp\app

C:\USBWebserverv8.5\root\cakephp\lib

?

寫道
if (!defined('APP_DIR')) {
define('APP_DIR', DS . 'cakephp' . DS . 'app' );
}
define('CAKE_CORE_INCLUDE_PATH', ROOT . DS .'cakephp'. DS . 'lib');

?

app和lib在同樣的路徑下,為什么設(shè)置的時(shí)候,一個(gè)加了root,一個(gè)沒(méi)加呢?

?

在app上加了root后,會(huì)出現(xiàn)

Warning: include(C:\USBWebserverv8.5\root\C:\USBWebserverv8.5\root\cakephp\app\Config\core.php) [function.include]: failed to open stream: Invalid argument inC:\USBWebserverv8.5\root\cakephp\lib\Cake\Core\Configure.php?on line?72

?

里面有2個(gè)c盤符,沒(méi)辦法,只能去掉

?

而如果lib上沒(méi)加root的話

?

Warning: include(\cakephp\lib\Cake\bootstrap.php) [function.include]: failed to open stream: No such file or directory in?C:\USBWebserverv8.5\root\myRootCakephp\index.php?on line?97

?

會(huì)直接認(rèn)成類似于linux的路徑。win自然認(rèn)不出來(lái)

?

所以說(shuō),調(diào)來(lái)調(diào)去的結(jié)果,只能是上面這個(gè)樣子,當(dāng)然,這也說(shuō)明,root,lib,app,是可以完全分開(kāi)的,完全符合cakephp的說(shuō)明。linux上可能會(huì)比較容易點(diǎn)。

?

?

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.

How to perform real-name authentication on Jingdong Mall APP How to perform real-name authentication on Jingdong Mall APP Mar 19, 2024 pm 02:31 PM

How to get real-name authentication on Jingdong Mall APP? Jingdong Mall is an online shopping platform that many friends often use. Before shopping, it is best for everyone to conduct real-name authentication so that they can enjoy complete services and get a better shopping experience. The following is the real-name authentication method for JD.com, I hope it will be helpful to netizens. 1. Install and open JD.com, and then log in to your personal account; 2. Then click [My] at the bottom of the page to enter the personal center page; 3. Then click the small [Settings] icon in the upper right corner to go to the setting function interface; 4. Select [Account and Security] to go to the account settings page; 5. Finally, click the [Real-name Authentication] option to fill in the real-name information; 6. The installation system requires you to fill in your real personal information and complete the real-name authentication

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.

Log in to Ubuntu as superuser Log in to Ubuntu as superuser Mar 20, 2024 am 10:55 AM

In Ubuntu systems, the root user is usually disabled. To activate the root user, you can use the passwd command to set a password and then use the su- command to log in as root. The root user is a user with unrestricted system administrative rights. He has permissions to access and modify files, user management, software installation and removal, and system configuration changes. There are obvious differences between the root user and ordinary users. The root user has the highest authority and broader control rights in the system. The root user can execute important system commands and edit system files, which ordinary users cannot do. In this guide, I'll explore the Ubuntu root user, how to log in as root, and how it differs from a normal user. Notice

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.

Steps and precautions for registering a Hong Kong Apple ID (enjoy the unique advantages of the Hong Kong Apple Store) Steps and precautions for registering a Hong Kong Apple ID (enjoy the unique advantages of the Hong Kong Apple Store) Sep 02, 2024 pm 03:47 PM

Apple's products and services have always been loved by users around the world. Registering a Hong Kong Apple ID will bring more convenience and privileges to users. Let’s take a look at the steps to register a Hong Kong Apple ID and what you need to pay attention to. How to register a Hong Kong Apple ID When using Apple devices, many applications and functions require using Apple ID to log in. If you want to download applications from Hong Kong or enjoy the preferential content of the Hong Kong AppStore, it is very necessary to register a Hong Kong Apple ID. This article will detail the steps on how to register a Hong Kong Apple ID and what you need to pay attention to. Steps: Select language and region: Find the "Settings" option on your Apple device and enter

See all articles