肥燕

肥燕

这家伙有点懒,还没写个性签名!

  • 财富值5
  • 威望值0
  • 总积分35

个人信息

  • 回复了 的评论

    我运行完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直接崩,基本是禁用的,这里却用来做教程,毒奶啊毒奶

试用期 等级规则
35/50
资料完整度
30/100
用户活跃度
0/100

Ta的关注

0

Ta的粉丝

0

Ta的访客

0