__construct method in thinkphp5.1
乘风破浪
乘风破浪 2018-12-16 21:50:09
0
1
1054

In thinkphp5.1, do the parameters passed in the __construct method must have default values?

The Container class always reports an error without default parameters

乘风破浪
乘风破浪

reply all (1)
Peter-Zhu

This is controlled by the programmer himself. If you do not pass in parameters when instantiating the container class, you should set a default value for these parameters, which is not mandatory

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!