laravelÖÐÔõôÊÖ¶¯×°ÖÃÀ©Õ¹£¨°ì·¨£©
ÔÚʹÓà laravel ¿ª·¢Àú³ÌÖУ¬ÎÒÃÇ¿ÉÄÜÐèҪװÖÃһЩÀ©Õ¹À´Öª×ãijЩÐèÇó¡£Í¨³£ÇéÐÎÏ£¬ÎÒÃÇ¿ÉÒÔÖ±½ÓʹÓà composer À´×°ÖÃÕâЩÀ©Õ¹¡£µ«ÓÐʱÓÉÓÚÍøÂçÏÞÖƵÈÔµ¹ÊÔÓÉ£¬ÎÒÃÇ¿ÉÄÜÎÞ·¨Ê¹Óà composer À´×°ÖÃÀ©Õ¹¡£Õâʱ£¬ÎÒÃǾÍÐèÒªÊÖ¶¯×°ÖÃÀ©Õ¹ÁË¡£
±¾ÎĽ«ÏÈÈÝÊÖ¶¯×°Öà Laravel À©Õ¹µÄÏêϸ°ì·¨¡£
ÏÂÔØÀ©Õ¹°ü
Ê×ÏÈ£¬ÎÒÃÇÐèÒª´Ó¹Ù·½ÍøÕ¾ÏÂÔØÐèҪװÖõÄÀ©Õ¹°ü¡£Í¨³£ÇéÐÎÏ£¬À©Õ¹°ü¶¼»áÒÔѹËõ°üµÄÐÎʽÌṩÏÂÔØ¡£ÔÚÏÂÔØ֮ǰ£¬ÎÒÃÇÐèҪȷ¶¨×Ô¼ºµÄ PHP °æ±¾ÒÔ¼°²Ù×÷ϵͳÀàÐͺÍλÊýµÈÐÅÏ¢£¬ÒÔÈ·±£ÏÂÔصÄÀ©Õ¹°üÓë×Ô¼ºµÄÔËÐÐÇéÐÎÆ¥Åä¡£
½âѹÀ©Õ¹°ü
ÏÂÔغÃÀ©Õ¹°üÖ®ºó£¬ÎÒÃÇÐèÒª½«Æä½âѹµ½Ö¸¶¨µÄĿ¼ÖС£Í¨³£ÇéÐÎÏ£¬ÎÒÃǽ«À©Õ¹°ü½âѹµ½ /usr/local Ŀ¼Ï£¬ÒÔ±ãÈ«¾ÖʹÓá£ÈôÊÇÖ»ÏëÔÚij¸öÏîÄ¿ÖÐʹÓøÃÀ©Õ¹£¬ÎÒÃÇ¿ÉÒÔ½«Æä½âѹµ½¸ÃÏîÄ¿µÄ vendor Ŀ¼Ï£¬È»ºóÊÖ¶¯×¢²á¸ÃÀ©Õ¹¡£
±à¼ php.ini Îļþ
×°ÖÃÀ©Õ¹°üºó£¬ÎÒÃÇÐèÒª±à¼ php.ini ÎļþÀ´ÆôÓøÃÀ©Õ¹¡£ÔÚ Linux ϵͳÖУ¬php.ini Îļþͨ³£Î»ÓÚ /etc/php.ini »ò /etc/php.d/ Ŀ¼Ï¡£ÔÚ Windows ϵͳÖУ¬php.ini Îļþͨ³£Î»ÓÚ PHP ×°ÖÃĿ¼µÄ php.ini ÎļþÖС£
ÔÚ php.ini ÎļþÖУ¬ÎÒÃÇÐèÒªÕÒµ½ extension_dir ºÍ extension Á½¸öÉèÖÃÏ²¢½«ÆäÐÞ¸ÄΪÈçÏÂËùʾ£º
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20160303/" extension = À©Õ¹Ãû³Æ.so
µÇ¼ºó¸´ÖÆ
ÆäÖУ¬extension_dir ÉèÖÃÏîÖ¸¶¨ÁËÀ©Õ¹¿âµÄλÖã¬ÐèҪƾ֤×Ô¼ºµÄÏÖÕæÏàÐξÙÐÐÐ޸ġ£extension ÉèÖÃÏîÖ¸¶¨ÁËÐèÒªÆôÓõÄÀ©Õ¹Ãû³Æ£¬ÐèÒª½« À©Õ¹Ãû³Æ.so ÐÞ¸ÄΪÏÖʵµÄÀ©Õ¹Ãû³Æ¡£
ÖØÆô PHP ЧÀÍ
Íê³ÉÒÔÉÏ°ì·¨ºó£¬ÎÒÃÇÐèÒªÖØÆô PHP ЧÀÍ£¬ÒÔʹÉèÖÃÉúЧ¡£ÔÚ Linux ϵͳÖУ¬ÎÒÃÇ¿ÉÒÔʹÓÃÈçÏÂÏÂÁîÖØÆô PHP ЧÀÍ£º
service php-fpm restart
µÇ¼ºó¸´ÖÆ
ÔÚ Windows ϵͳÖУ¬ÎÒÃÇ¿ÉÒÔÔÚ¿ØÖÆ̨ÖÐÕÒµ½ PHP ЧÀͲ¢¾ÙÐÐÖØÆô²Ù×÷¡£
ÖÁ´Ë£¬ÎÒÃÇÒѾÀÖ³ÉÊÖ¶¯×°ÖÃÁË Laravel À©Õ¹£¬²¢ÆôÓÃÁ˸ÃÀ©Õ¹¡£ÈôÊÇÐèÒªÔÚij¸öÏîÄ¿ÖÐʹÓøÃÀ©Õ¹£¬ÎÒÃÇ»¹ÐèÒªÔÚ config/app.php ÎļþÖÐÊÖ¶¯Ìí¼Ó¸ÃÀ©Õ¹µÄЧÀÍÌṩÕߺÍÃÅÃæ¡£
×ÛÉÏËùÊö£¬ÊÖ¶¯×°Öà Laravel À©Õ¹²¢²»ÄÑ£¬µ«ÐèÒª½Ï¸ßµÄ²Ù×÷ÊÖÒÕºÍÂÄÀú¡£ÎªÁËÈ·±£×°ÖÃ˳ËìÍê³É£¬ÎÒÃÇÐèÒªÈÏÕæÔĶÁ¹Ù·½Îĵµ£¬ÊìϤÀ©Õ¹µÄ×°ÖÃÀú³ÌºÍÉèÖÃÒªÁ졣ͬʱ£¬ÎÒÃÇ»¹½¨ÒéÔÚ×°ÖÃÇ°±¸·ÝÏà¹ØÎļþºÍÉèÖã¬ÒÔÃⱬ·¢²»¿ÉÕ¹ÍûµÄ¹ýʧ¡£
ÒÔÉϾÍÊÇlaravelÖÐÔõôÊÖ¶¯×°ÖÃÀ©Õ¹£¨°ì·¨£©µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡