Dab tsi yog .ENV cov ntaub ntawv hauv laravel?
Dab tsi yog .ENV cov ntaub ntawv hauv laravel?

Video: Dab tsi yog .ENV cov ntaub ntawv hauv laravel?

Video: Dab tsi yog .ENV cov ntaub ntawv hauv laravel?
Video: Leng Yang - Yog Vim Dab Tsi (Official Full Song | Nkauj Tawm Tshiab) 2020/05/24 2024, Hlis ntuj nqeg
Anonim

env file uas muaj ntau yam kev teeb tsa, ib kab - ib qho KEY = VALUE khub. Thiab tom qab ntawd, hauv koj lub siab Laravel qhov project code koj tuaj yeem tau txais cov kev hloov pauv ib puag ncig nrog kev ua haujlwm env ('KOJ').

Khaws qhov no saib, siv. ENV cov ntaub ntawv hauv laravel yog dab tsi?

Laravel's . env file suav nrog siv , yog li nws yog ib qho yooj yim kom muaj qhov sib txawv configuration raws li cov ib puag ncig koj lub app tab tom khiav. Qhov no ua rau koj yooj yim kom muaj ntau qhov sib txawv rau hauv zos, theem, ntau lawm, thiab txawm tias sib txawv tsim cov tshuab.

Qhov thib ob, ENV cov ntaub ntawv yog dab tsi? Cov ENV file extension yog feem ntau txuam nrog Adobe Acrobat thiab Acrobat Reader cov ntaub ntawv . Ib ENV file tuav cov ntawv sau thiab hom ntawv teeb tsa. Acrobat tso cai rau koj ntes ib daim ntawv thiab tom qab ntawd saib lossis qhia nws hauv nws cov hom qub thiab zoo li qub.

Tsis tas li ntawd,. ENV cov ntaub ntawv nyob rau hauv laravel nyob qhov twg?

env file yuav tsum nyob rau hauv lub hauv paus directory ntawm koj Laravel app. Tsis muaj txoj hauv kev los hloov cov cov ntaub ntawv qhov chaw (thiab kuv xav tias tsis muaj qhov taw tes ib yam nkaus). Ntxiv mus, lub hauv paus nplaub tshev YUAV TSUM tsis yog pej xeem nplaub tshev, raws li. env yuav tsum tsis txhob raug kev nkag mus rau pej xeem, txwv tsis pub lub hom phiaj kev ruaj ntseg tseem ceeb ntawm nws yuav ploj tag nrho.

App_env yog dab tsi hauv laravel?

Laravel 5 tau txais nws ib puag ncig muaj feem cuam tshuam los ntawm.env cov ntaub ntawv nyob rau hauv lub hauv paus ntawm koj qhov project. Koj tsuas yog yuav tsum tau teeb tsa APP_ENV rau yam koj xav tau, piv txwv li: APP_ENV = kev loj hlob. Qhov no yog siv los txheeb xyuas cov cheeb tsam tam sim no.

Pom zoo: