konfiguracje
To jest stara wersja strony!
Spis treści
Konfiguracja środowiska
Alias do katalogu /pliki (common/config/main.php)
<?php return [ ... 'aliases' => [ ... '@pliki'=>realpath(dirname(__FILE__).'/../../pliki') ],
Ścieżka do pliku
$path = Yii::getAlias('@pliki') . '/plik.pdf';
Debuger
backend/config/main.php
... 'components' => [ ... 'log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [ [ 'class' => 'yii\log\FileTarget', 'levels' => ['error', 'warning'], ] ], ], ... ],
backend/config/main-local.php
<?php $config = [ 'components' => [ 'request' => [ // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation 'cookieValidationKey' => '23dYgoKbKertzSurkz6NwWgk2ntW9NII', ], ], ]; //if (!YII_ENV_TEST) { // configuration adjustments for 'dev' environment $config['bootstrap'][] = 'debug'; $config['modules']['debug'] = [ 'class' => 'yii\debug\Module', 'allowedIPs' => ['*'], ]; $config['bootstrap'][] = 'gii'; $config['modules']['gii'] = [ 'class' => 'yii\gii\Module', ]; //} return $config;
konfiguracje.1670515820.txt.gz · ostatnio zmienione: 2024/09/15 16:22 (edycja zewnętrzna)