Category:PHP

  • PHP mysqli_ stmt_ bind_ Param mysqli function

    Time:2020-9-26

    Definition and Usage mysqli_stmt_bind_param– bind variables to prepared statements as parameters Version support PHP4 PHP5 PHP7 I won’t support it support support grammar mysqli_stmt_bind_param ( mysqli_stmt $stmt , string $types , mixed &$var1 [, mixed &$… ] ) Pass to mysqli_ In the SQL statement of prepare(), bind variables for parameter markers. be careful: if […]

  • Laravel modification verification exception response format example code details

    Time:2020-9-26

    The default response format of larravel is as follows. Sometimes this format does not meet its own requirements and needs to be modified. // status 422 { “message”:”The given data was invalid.”, “errors”:{ “url”:[ “Invalid URL format” ] } } Thrown when the request fails validationValidationExceptionException, which is finally handed over to the global exceptionHandlerClass […]

  • Understanding cookie, session, token, JWT

    Time:2020-9-25

    History of development 1. A long time ago,WebBasically, it’s just browsing documents. Since it’s browsing, as a server, it doesn’t need to record who browsed what documents in a certain period of time. Each request is a new oneHTTPProtocol is request plus response, especially I don’t have to remember who just sent itHTTPRequests, every request […]

  • Ascii_Demo

    Time:2020-9-25

    Static keyword initialization: 1. Variables Initialization can be initialized to basic constants such as numbers, characters, arrays, etc Ex: static $a = 1, static $a = array(), etc However, it cannot be initialized to variables, objects, expressions, function return values, etc Ex: $B = 1; static $a = $B, static $a = new obj(), etc […]

  • Tp5.1 framework database common operation details [add, delete, update, query]

    Time:2020-9-25

    This paper describes the common operations of tp5.1 framework database. For your reference, the details are as follows: Tp5.1 — database add operation useDb ClassinsertMethods submit data to the database $data = [‘foo’ => ‘bar’, ‘bar’ => ‘foo’]; Db::name(‘user’)->insert($data); insertMethod returns the number of successfully added data. Normally, it returns 1 Or usedataMethod coordinationinsertuse. $data […]

  • Timeout problem in [PHP] socket client

    Time:2020-9-24

    Connection socket is divided into connection timeout and read timeout $sock=stream_ socket_ client(” www.google.com : 80 “, $errno, $errstr, 2); that number is the connection timeout. For example, if you connect to Google, an error will be returned in 2 seconds, so that you won’t be waiting there all the time stream_ set_ Timeout ($sock, […]

  • Analysis of sub query operation example in tp5.1 framework database

    Time:2020-9-24

    This paper describes the sub query operation of tp5.1 framework database. For your reference, the details are as follows: First, construct the subquery SQL. You can use the following three ways to build a subquery. Using the fetchsql method The fetchsql method represents that it does not query, but only returns the built SQL statement, […]

  • Vscode configuration Xdebug related configuration

    Time:2020-9-23

    xdebug.remote_ Autostart = on; / / if you don’t have this parameter, you can’t catch the breakpoint. It’s very strange. Do you know why

  • Is swote encryption crack free

    Time:2020-9-23

      The execution of the program and the encryption and decryption process are unique. No matter the internal developers or external hackers attack, even if they get the data and private key and the root authority of the server, they can’t decrypt and restore the data. Swoole divides encryption and decryption into three parts (program […]

  • Example analysis of tp5.1 framework join method usage

    Time:2020-9-23

    This paper describes the usage of join method in tp5.1 framework. For your reference, the details are as follows: JOINMethod is used to query data from two or more tables based on the relationship between the columns in those tables. Join usually has the following types. Different types of join operations will affect the returned […]

  • Probe into the usage of PHP yield coprocessor generator (1)

    Time:2020-9-22

    Series articles: Probe into the usage of PHP yield coprocessor generator (1) Write it at the front In this article, I want to discuss the usage of PHP yield in the generatorforeach,for, whileThe circular one. On the discussionyieldThe use of turning a function into a generator. aboutyieldFeature, is in developmentPHP5It was put on the agenda,PHP5.5The […]

  • PHP 7.4.0 release! Let’s see what’s new

    Time:2020-9-22

    PHP 7.4.0 has been released, marking the fourth feature update of the PHP 7 series. After reading the English manual, we find that it has made a lot of improvements and brought some new features. Now, you can:   1.Typed PropertiesType properties Class properties now support type declaration, and the following example will force $user […]