肥燕
我运行完composer global require "fxp/composer-asset-plugin:~1.0.0"这个命令后出现这个
C:\Users\lenovo>composer global require "fxp/composer-asset-plugin:~1.0.0" Changed current directory to C:/Users/lenovo/AppData/Roaming/Composer You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug [Composer\Exception\NoSslException] The openssl extension is required for SSL/TLS protection but is not available. If you can not enable the openssl extension, you can disable this error, at you r own risk, by setting the 'disable-tls' option to true. require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort- packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] [<packag es>]... C:\Users\lenovo>
遇到同样的问题,请问最后怎么解决了的
- 肥燕 赞了回答
catch (Exception $e)
改成
catch (\Exception $e)
即可因为\Exception 是yii所有异常的基类。而你写的Exception可能是上文use的某个命名空间的Exception。然而这个Exception和getBank方法里抛出的异常,不是同一个异常类。所以捕获不到。
参见:https://taoliujun.github.io/2017/yii-can-not-catch-exception/
- 肥燕 赞了评论
很多教程都是祸害新手的,也挂在网上,循环插入数据量大Mysql直接崩,基本是禁用的,这里却用来做教程,毒奶啊毒奶