基础篇8. 开启并创建settings.local.php文件

龷龶龳龯龮龬龫龪龧龤龶settings.php龋龈龅龄龂龋龈龀齾齺齹齶齴齱齯齬齨齧齣龧齢齠齝齚龀齖齒齏齱齯齧齠齋齊齇齃龅

齁龯龮鼽鼺鼹鼶鼳鼰齝鼬龋龈龀鼹鼶鼫local.鼙齝龄鼗鼔鼐鼬龋龈齧龷鼏鼍鼊齧鼊鼆鼂鼁鼀黾黼黻龅黺黷黶

/**
 * Load local development override configuration, if available.
 *
 * Use settings.local.php to override variables on secondary (staging,
 * development, etc) installations of this site. Typically used to disable
 * caching, JavaScript/CSS compression, re-routing of outgoing emails, and
 * other things that should not happen on development and testing sites.
 *
 * Keep this code block at the end of this file to take full effect.
 */
 if (file_exists(__DIR__ . '/settings.local.php')) {
   include __DIR__ . '/settings.local.php';
 }

龄龂黼黻齧麨麥麣麡麠麣麝麙鼬settings.local.php龋龈齝麘麗麙鼬齝麓麒麏settings.php麋麈麥settings.local.php龄龂龋龈龅

鼔齖麄麂鼬龋鹾龀鹻鼁龄鼀黾鹷鹳齝鼔鹰鹬龫鹩鹦鹣龮齝鹡鹬龫鹞龄鼀黾鹷鹳齧鹜鹘鹗鹓鹏鹌齝齁鹈鹅麨麥龅

鹂齋鹁鸽鸼鸺齧鹰鸸齝鼔鼂鼁齧3黾鹷鹳麄鼰鼐齾鸵鸱鸰齝鸮麣鹡龫鹷鹳龀齒鸪settings.local.php鸨麄麂鸤龅

龄鼗鸣齧鸟鸝麣齝鸚齴龄龂龋龈齒鸪鸤鸗鸕齢齠齝麋鸑鸍鸉鸆龀鹰鸸鸂鷿齧鷾鸵鹬龫麥鼁齧齢齠鷽鷺鷺鹰龤鼗龅鸵麂鷶鷵鷳鷱鸗鷮麈麥鷮鷭齧settings.local.php龋龈龅

鷪麘齝麨鷨鷥鷤鸑鸍鷣齝龯龮鹬龫齶鷠齱齯JS鷜CSS齧鷛鷙鼳鼰齝龄鼗鷗鼰鼬鸑鸍齧鼺鷕龀鹻鼁龯龮鹬龫齧龋龈龅鸝鷨齝麘麗JS鷔鷣CSS龋龈鷐鷛鷙鸤齝齬齨鸨鼐麥齹龂龋龈鷌鷈鷄龤龂鷶齧龋龈齝drupal麥龄鸕鸼鸺龳鷂鶾http齧鶺鶶齠鶳齝鶯麂鶫龳鶧鶥齱齯齧鶣鸑鶡鶝龅鸮麣龯龮鼬鸑鸍鷥鷤齧鶜鶛齝鸨鹰鼰麈麥龄龂鼳鼰龅

鸵麂龯龮鹬龫鶚鶗龤龂鹡鼬龯龮鷮鷭鶔鶐鹅麨麥齧settings.php龋龈龅龄龂龋龈鼬鶎鶊鷜鶆鶂黼黻齧鶜鶛齝麄麂鷐麒麏龅龄鸨鶁鶀鸤龯龮鵾龄龂鶔鶐龋龈齧龪龧齝鹰鼐鵼鵸鼁齚鹈鷾龅

Drupal齧鸑鸍鷣鵶鵵鷨龯龮鵲鵰鼁鸤龄龂鹬鶶齝鸝鶫鹈龮鼬sites龋龈鵬龀鷨龯龮鵫鵩鸤龤龂example.settings.local.php龋龈齝龯龮鹬龫鸣齧麣齝拷鵣龄龂龋龈鶯鵠龧鼬 sites/default鵝鵚龶鵖鹜鵕龄鵑齧鵎鵋鵇齝麣鵠鼁default龋龈鵬龀鵃 齝鶯鹞龋龈鵀鹦鷄settings.local.php龅

本书共56小节:

评论 (2)

    • 2018-03-15

    按照教程操作 ,但是settings.local.php 并没有生效 如何排除错误呢

  • 好多人都遇到过类似的问题,原因五花八门,总结下来就是不细心,以为自己按照教程操作了,但是其实在细节上有偏差。

    排除错误的方法很简单,把所有的步骤全部重新做一遍,核对文件名、文件路径、清空缓存等。

    其实你上面说的两句话,我都无法验证,是否“按照教程操作了”,你还得自己验证;

    “没有生效”,这是个结论不是现象,你是如何得出的结论?