Tag:php

  • Mysqli in PHP_ get_ server_ Instance usage of version()

    Time:2021-8-2

    This article introduces mysqli in PHP_ get_ server_ The definition and usage of the version () method. I hope it will be helpful to the little partners who are learning MySQL and PHP! Definition and Usage mysqli_ get_ server_ The version() function returns the MySQL server version as an integer. The MySQL server version will […]

  • PHP post line feed method

    Time:2021-8-1

    How does PHP post line feed? How to wrap the value taken out of PHP in the text! The problem code is as follows: <?php $str=$_POST[‘name1′].’-‘.$_POST[‘phone1′].’-‘.$_POST[‘address’].’-‘.$_POST[‘express’]; echo $str.”<br>”; $fp=fopen(“b.txt”,”a+”); fwrite($fp,$str);// write in fclose($fp);// close ?> terms of settlement: $str=$_POST[‘name1′].’-‘.$_POST[‘phone1′].’-‘.$_POST[‘address’].’-‘.$_POST[‘express’].”\r\n”; Just add “\ R \ n” after it, this is the newline character of the text. […]

  • PHP implementation of New Coronavirus epidemic real-time map

    Time:2021-7-31

    Let’s take a look at the operation diagram first Let’s look at the source code: <?php // interface data for grasping tremble tiktok global $nCov_data; $nCov_data[‘data’]=get_nCoV_douyin_news(); $nCov_data[‘total’]=get_nCoV_douyin_total(); function get_nCoV_douyin_news(){ [email protected]_get_contents(‘https://i.snssdk.com/api/feed/forum_flow/v1/?forum_id=1656388947394568&is_web_refresh=1&channel=local_test&query_id=1656388947394568&tab_id=1656388947394584&is_preview=1&stream_api_version=82&aid=13&forum_id=1656388947394568&is_preview=0’); $c=count(json_decode($content)->data)-1; [email protected]_decode(json_decode($content)->data[$c]->content)->sub_raw_datas; if ($getInfos){ foreach ($getInfos as $k=>$Info){ $data[$k]=[ ‘showtime’=>$Info->raw_ data->showtime_ String, // display time ‘desc’=>$Info->raw_ Data – > DESC, // SMS ‘event_ time’=>$Info->raw_ data->event_ […]

  • PHP elasticsearch to explain search examples

    Time:2021-7-30

    Elasticsearch is a Lucene based search server. It provides a distributed multi-user full-text search engine based on restful web interface. Elasticsearch is developed in Java and released as an open source under the Apache license terms. It is a popular enterprise search engine. Designed for cloud computing, it can achieve real-time search, stable, reliable, fast, […]

  • PHP image processing imagestring add image watermark and text watermark operation example

    Time:2021-7-28

    This paper describes the operation of adding image watermark and text watermark in PHP image processing imagestring. Share with you for your reference, as follows: Imagestring add image watermark <?php header(“Content-Type: text/html;charset=utf-8”); //Specify picture path $src = ‘001.png’; //Get picture information $info = getimagesize($src); //Get picture extension $type = image_type_to_extension($info[2],false); //Dynamically import pictures into memory […]

  • PHP test Kafka project example

    Time:2021-7-27

    This article describes the PHP test Kafka project as an example. Share with you for your reference, as follows: summary Kafka was originally developed by LinkedIn. It is a distributed, partitioned, multi replica, multi subscriber distributed logging system based on zookeeper coordination (which can also be used as an MQ system). It can be commonly […]

  • PHP method to find whether a column of ordered arrays contains a value

    Time:2021-7-26

    Question: for a column of ordered arrays, how to judge whether a given value exists in the array. Idea: the simplest way to judge whether it exists is to directly cycle the array and compare each value. However, for ordered arrays, this writing does not make good use of the feature of “order”. All we […]

  • PHP implementation of markdown article upload to seven cattle map bed instance content

    Time:2021-7-18

    After using markdown to write articles, we often need to publish them to different platforms. There is a problem here. The pictures of articles need to be uploaded manually, which is very inconvenient to manage. Therefore, it is strongly recommended to upload the pictures to the drawing bed, so that an article can be easily […]

  • Method analysis of establishing database connection in singleton mode with PHP

    Time:2021-7-16

    This paper introduces the method of establishing database connection in singleton mode with PHP. The details are as follows: Understanding PHP singleton pattern 1、 What is a singleton Wiki Encyclopedia: Singleton pattern, also known as singleton pattern, is a common software design pattern. When applying this pattern, the class of singleton object must ensure that […]

  • PHP array pointer function functions and usage examples

    Time:2021-7-15

    This paper introduces the function and usage of PHP array pointer function. The details are as follows: The array pointer functions are reset (), prev (), current (), next (), end (), key (), each () Reset(), prev(), current(), next(), end(), are all functions related to the value of the array, key() is only related […]

  • PHP + Ajax to achieve upload, delete, modify a single picture and background processing logic operation details

    Time:2021-7-9

    In this paper, an example of PHP + Ajax implementation of upload, delete, modify a single picture and background processing logic operation. The details are as follows: Updated on July 4, 2019 Update reason: The UI display of the front interface is not good-looking Background processing logic confusion, involving multiple images, processing is very troublesome, […]

  • PHP enumeration type management and design knowledge summary

    Time:2021-7-8

    Today, let’s share how to manage PHP enumeration types. A common way is to use constants to represent enumeration types Const yes =’Yes’; Const no =’No ‘; On this basis, it can be further encapsulated into classes for easy management class BoolEnum { Const yes =’Yes’; Const no =’No ‘; } Now, we want to […]