Tag:php

  • Experience of using custom fields in WordPress

    Time:2020-4-6

    Keyword Description: how to use the definition I have been using WordPress for a while. In the process of building my blog, I have accumulated a lot of experience. I like the custom fields of WordPress very much. With the custom fields, I can complete many custom functions. The custom fields will see each time […]

  • [Redis5 source code learning] analysis of the randomkey part of redis command

    Time:2020-4-5

    baiyan Command syntax Command meaning: randomly return a key from the currently selected databaseCommand format: RANDOMKEY Command actual combat: 127.0.0.1:6379> keys * 1) “kkk” 2) “key1” 127.0.0.1:6379> randomkey “key1” 127.0.0.1:6379> randomkey “kkk” Return value: random key; nil if database is empty Source code analysis Main process The processing function corresponding to the keys command is […]

  • Analysis of the function and usage of static keyword in PHP

    Time:2020-4-5

    This paper introduces the function and usage of static keyword in PHP. To share with you for your reference, as follows: 1. What is static? Static is a very common modifier in C + +, which is used to control the storage and visibility of variables. However, in PHP, static keyword is used to define […]

  • Laravel service container must know

    Time:2020-4-4

    The article was forwarded from the professional laravel developer community. Original link: https://learnku.com/laravel/t To learn how to build an application with laravel is not only to learn how to use different classes and components in the framework, but also to remember allartisanCommand or all helper functions (we have Google). Learning to code with laravel is […]

  • PHP to insert, delete and replace arrays to any location

    Time:2020-4-4

    The example of this paper describes how to insert, delete and replace data in any place in PHP. To share with you for your reference, as follows: Array_splice function can be used to insert, delete and replace any position array array_splice ( array &$input , int $offset [, int $length = count($input) [, mixed $replacement […]

  • Redis5 source code learning

    Time:2020-4-3

    Grape Command syntax Command meaning: remove the given key’s lifetime, and convert the key from “Volatile” (with lifetime key) to “persistent” (a key without lifetime and never expires).Command format: PERSIST key Command actual combat: redis> SET mykey “Hello” OK redis> EXPIRE mykey 10 (integer) 1 redis> TTL mykey (integer) 10 redis> PERSIST mykey (integer) 1 […]

  • Development of diamond OTC running system

    Time:2020-4-3

    PHP date, reference The PHP date() function formats timestamps as dates and times that are more readable.algorithmPHP date – format dateThe first parameter of the date() function specifies how to format the date / time. It uses letters to represent the format of the date and time. Here are some available letters:D – day of […]

  • [redis5 source code learning] an analysis of the rename section of redis command

    Time:2020-4-1

    baiyan Command syntax Command meaning: change the key to newkeyCommand format: RENAME key newkey Command actual combat: 127.0.0.1:6379> keys * 1) “kkk” 2) “key1” 127.0.0.1:6379> rename kkk key1 OK 127.0.0.1:6379> keys * 1) “key1” 127.0.0.1:6379> rename kkk kkk (error) ERR no such key Return value: if the name change is successful, it will prompt OK, […]

  • Introduction to the battle of urlos – making lap Website Environment

    Time:2020-4-1

    1. Make lap image1.1. Log in to the host machine using SSH, create the dockerfiel file and fill in the following contents FROM php:7.2.16-apache-stretch ENV TIME_ZONE Asiz/Shanghai RUN sed -i ‘s~//.*.debian.org~//mirrors.aliyun.com~’ /etc/apt/sources.list \ && apt-get update \ && apt-get install -y libxml2-dev libicu-dev libzip-dev \ && docker-php-ext-install zip bcmath intl mbstring mysqli pdo_mysql exif sockets […]

  • Use redis Bitmap bitmap to implement check-in function (PHP version)

    Time:2020-3-31

    What needs to be optimized, please point out in your comments I. demand Record user sign in, query user sign in 2、 Technical proposal 1. Use MySQL (max’u time field is consecutive check-in days) Train of thought:(1) When the user checks in, insert a record, and query whether to check in yesterday according to create […]

  • Yezi technology python3 code is compatible with python2

    Time:2020-3-31

    Yezi electric competition data official website revised https://www.xxe.io/new debutPython3 code is compatible with python21. Use the future featureEach new version of Python will add new features or make changes to the original features. Some changes are not compatible with the old version, that is, the code running normally in the current version may not run […]

  • Notes on MySQL basic knowledge (transaction)

    Time:2020-3-31

    PS: the knowledge content and materials collated in this article are all from the column “SQL must know must know” of geek time The InnoDB engine of MySQL supports transactions, and MyISAM does not support transactions; Transaction Basics Four characteristics of transaction: Acid AThat is, atomicity. The concept of atom is indivisible. It can be […]