thinkphp5 - Related information

  • Consult about the problem of belongsTo association in thinkphp5

    situation description: A Table: user s coupon Information Table, Field: id,ticket_id,status B Table: voucher Information Table, Field: id,ticket_info,status in Model A, there is the following code: class An extend Model { public function getUserTi...

    Feb.28,2021
  • Sometimes tp5.1 can't find a class of the framework.

    has been developing with tp5.1 recently. Because of the requirements, there is no front-end separation, using the template engine. But a strange phenomenon occurs when I load a page occasionally that some classes of the system do not exist. Such as thi...

    Feb.28,2021
  • Problems with thinkphp5.17 federated query

    this sql statement, under thinkphp5.17 tp there is another problem. My sql statement is executed incorrectly. I can t see the error statement in the tract panel or runtime log. I want to see what I did wrong and what I think. ...

    Feb.28,2021
  • Php sets the corresponding key of the cache

    I use thinkphp5 I don t know how a key corresponds to a value when using cache my preliminary idea is to apply controller name concatenation method name splicing all passing parameters md5 encrypted string as key when you get the cache, you also...

    Feb.28,2021
  • Model events such as TP5.0 before_insert are invalid?

    follow the ThinkPHP5.0 official manual prompt: User::event( before_insert , function ($user) { if ($user->status != 1) { return false; } }); :https: www.kancloud.cn manua... TP beforeInsert ,,,,. the direct insertion is s...

    Feb.28,2021
  • Please help me convert this native SQL statement into TP5 thank you!

    ask God to help me translate this native SQL statement into TP5 thank you! It is Db:: ( name )-> this kind of chained operation select a.id, a.titlerect a. Createwriting time as answer_count from fa_question a. Isometric solvepaper count (b.qid) as ...

    Feb.28,2021
  • Json_encode problem under thinkphp5

    I set up User.php, User.php under the model layer and have a method getUserInfo to query the data, as follows: $userModel = new UserModel; dump($userModel->getUser()); dump(json_encode($userModel->getUser())); the first printed data is as follo...

    Feb.28,2021
  • Prompt class not found for references between class files under the tp5 framework on the server

    for example, the following figure shows the error message and the corresponding file under applicationmobilesupportcontroller the namespace of both class files is namespace appmobilesupportController; Message file with the following use: use app...

    Feb.28,2021
  • Tp5 uses redis, to add extension guidance

    how do you tp5 encapsulate the extension function of redis? Because there are only simple functions of set and get by default, guide me. ...

    Feb.27,2021
  • MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
    MySQL Error : Disk full (/tmp/#sql-temptable-64f5-34a6085-1ab97.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
    MySQL Errno : 1021
    Message : Disk full (/tmp/#sql-temptable-64f5-34a6085-1ab97.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
    Need Help?