基础篇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龄

本书共76小节:

评论 (2)

    • 2018-03-15

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

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

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

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

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