×ðÁú¿­Ê±

laravelΪʲôÕÒ²»µ½.evnÎļþ

ÔÚʹÓÃlaravel¾ÙÐпª·¢Ê±£¬ÎÒÃdz£³ £»áʹÓÃ.envÎļþÀ´ÉúÑÄ×ðÁú¿­Ê±ÇéÐÎÉèÖÃÐÅÏ¢¡£Õâ¸öÎļþ½ÏÁ¿Ö÷Òª£¬Òò´ËÔÚʹÓÃlaravelµÄÀú³ÌÖлáÓÐһЩÎÊÌâºÍ¹ýʧ£¬ÆäÖÐÖ®Ò»¾ÍÊÇÕÒ²»µ½.envÎļþµÄÇéÐΡ£Õâ¸öÎÊÌâÓÐÐí¶àÔµ¹ÊÔ­ÓÉ£¬ÏÂÃæ¾ÍÀ´ÖðÒ»ÆÊÎö¡£

Ò»¡¢ÎļþδÌí¼Óµ½°æ±¾¿â

ÈôÊÇÄãÕýÔÚʹÓð汾¿ØÖÆϵͳ£¬ÀýÈçGit£¬ÄÇôÔÚÄãµÄÏîÄ¿ÖУ¬.envÕâ¸öÎļþÊDz»»á±»Ìá½»µ½°æ±¾¿âµÄ¡£Í¨³£À´Ëµ£¬ÄãµÄ.gitignoreÎļþÓ¦¸Ã°üÀ¨.envÎļþ£¬ÕâÑùÒ»À´.git»áºöÂÔÕâ¸öÎļþ£¬Ëü¾Í²»»á±»Ìá½»µ½°æ±¾¿âÖÐÁË¡£

¶þ¡¢ÎļþÃû¹ýʧ

ÔÚLaravelÖУ¬ÎÒÃÇʹÓõÄÊÇ.envÎļþ£¬ÈôÊÇÄãƾ֤ÃüÃûÏ°¹ß£¬½«ÎļþÃû¸ÄΪÁËÓ¢Îĵġ°env¡±£¬»òÕßÆäËû²»×¼È·µÄÃû×Ö£¬ÄÇô¾Í»á±»ÊÓΪûÓÐÕÒµ½Îļþ¡£

Èý¡¢ÎļþλÖùýʧ

ͨ³£À´Ëµ£¬.envÎļþÓ¦¸Ã·ÅÔÚ¸ùĿ¼ÖУ¬Ò²¾ÍÊǺÍcomposer.jsonµÈÎļþͬ¼¶¡£ÈôÊÇÄ㽫.envÎļþ·ÅÔÚÆäËûλÖ㨺ñÈpublicµÈĿ¼£©£¬ÄÇôLaravelÒ²»áÌáÐÑ¡°ÕÒ²»µ½.envÎļþ¡±¡£

ËÄ¡¢½â¾öÒªÁì

ÈôÊÇÄãÓöµ½ÁËÕÒ²»µ½.envÎļþµÄÇéÐΣ¬ÄÇô¿ÉÒÔʹÓÃÒÔÏÂÒªÁìÀ´½â¾ö£º

1.¼ì²é.gitignoreÎļþÊÇ·ñ°üÀ¨ÁË.envÎļþ£¬ÈôÊÇÊÇ£¬ÔòÔÚÌύǰ½«.envÎļþÌí¼Óµ½°æ±¾¿âÖС£

2.¼ì²é.envÎļþÃûÊÇ·ñ׼ȷ£¬Ó¦¸ÃÊÇ¡°.env¡±£¬¶ø²»ÊÇÆäËûÃû×Ö¡£

3.¼ì²é.envÎļþÊÇ·ñ·ÅÔÚÁË׼ȷµÄλÖ㬼´ÏîÄ¿¸ùĿ¼¡£

4.ÈôÊÇÒÔÉÏÒªÁ춼²»Æð×÷Ó㬿ÉÒÔʵÑéÖ±½Ó´ÓGitHubÏÂÔØLaravelÔ´Â룬²¢½«.env.exampleÎļþ¿½±´Îª.envÎļþ£¬È»ºóÖØÐÂ×°Öà composer ÒÀÀµ¡£

LaravelÊÇÒ»¸ö¸ßЧµÄPHP¿ò¼Ü£¬.envÎļþÊǺÜÊÇÖ÷ÒªµÄÒ»¸öÎļþ£¬ËüÉúÑÄ×ÅËùÓеÄÇéÐαäÁ¿£¬Òò´ËÔÚʹÓÃLaravelµÄʱ¼ä£¬ºÜÊÇÐèҪעÖØÕâ¸öÎļþµÄ±£´æ¡£ÒÔÉϾÍÊÇÕÒ²»µ½.envÎļþµÄÔµ¹ÊÔ­ÓÉÏ¢Õù¾öÒªÁ죬ϣÍû¶ÔÄãÓÐËù×ÊÖú¡£

ÒÔÉϾÍÊÇlaravelΪʲôÕÒ²»µ½.evnÎļþµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±ÊµÊ±ÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎ壬9:30-18:30£¬½ÚãåÈÕÐÝÏ¢

QR code
¡¾ÍøÕ¾µØͼ¡¿¡¾sitemap¡¿