About linking the database before using the model in tp5
phpcn_u187094
phpcn_u187094 2018-05-02 09:29:38
0
1
918

It is known that the model in tp5 can automatically associate a data table, provided that the database where the table is located has been connected. Please tell me, in addition to configuring the database information in database.php, can I connect to the database in the model file? Yes. What if you define the link function in the class and then call the function in other files?

phpcn_u187094
phpcn_u187094

reply all(1)
猪哥

Look at the manual, this one has an introduction

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!