php, array function

Array function 1 – count array length $array1 = array(1,2,3,4); length=count(array1); print_r($length); The printing result is: 4 Note: php needs to print string with print ur; 2 – array? Shift removes the first element from the array and returns $array1 = array(1,2,3,4); $arr = array_shift( $array1); ...

Posted on Sat, 02 May 2020 21:19:35 -0400 by eheia

mongodb advanced statement

Indexes View index db.Ttest.getIndexes(); A kind of db.getCollection('Ttest').getIndexes(); New index #New index for time field db.Ttest.ensureIndex({"LTimeB":1}) query Nested array for paging query #Z118005 this is a nested array db.getCollection('Ttest').aggregate([{$match: {"_id": ObjectId("5a53136a ...

Posted on Sat, 02 May 2020 19:15:49 -0400 by gioahmad

Tiktok, private letter, name card, jump, how to make WeChat technology?

Tiktok has been busy and has no time to record notes. Here, the author rewrote the code records according to the rules of the open interface of the jitter, which is convenient for later use and also for reference.The code is as follows. The way of calling is js,html, and php mode. I have screenshot of the generated style. Insert picture descri ...

Posted on Sat, 02 May 2020 05:48:57 -0400 by JKinBlack

ubuntu easy to install php+nginx

One install php Install php and execute the following command sudo apt-get install php Install PHP FPM - remember your version of PHP FPM sudo apt-get install php-fpm 2. Install nginx Install nginx and execute the following command sudo apt-get install nginx Enter nginx configuration directory ...

Posted on Sat, 02 May 2020 01:21:22 -0400 by hendoyeah

The PHP encryption and decryption algorithm function of discuz

1. Foreword Kangsheng's authcode function is very powerful. It is an encryption and decryption function with a valid period. The results of each encryption of the same character are inconsistent, and you can customize the expiration time. Design principle: authcode uses exclusive or operation to encrypt and decrypt. encryption Clear text: 1 ...

Posted on Fri, 01 May 2020 22:11:41 -0400 by swissmissflash

LNMP Architecture - Nginx security chain, access control

Nginx anti theft chain Stealing chain refers to that one website's resources (pictures or attachments) are not allowed to browse and download in other websites, especially the stealing chain of popular resources, which consumes a lot of bandwidth; Modify profile [root@dl-001 ~]# vim /usr/local/nginx/conf/vhos ...

Posted on Fri, 01 May 2020 19:21:22 -0400 by Dimensional

Copy and reference assignment of PHP array

1, When PHP array variable $arr is assigned to another variable $one, the whole array variable $arr is copied to $one, even if $arr is a multidimensional array. Example: $arr = array(1, 2, 3, array('one', 'two')); $one = $arr;# Output original array $arr print_r($arr);  # Array ( [0] => 1 [1] => 2 [2] => 3 [3] => Array ( [0] =&gt ...

Posted on Fri, 01 May 2020 15:53:53 -0400 by FoxhoundX

linux learning Part 43: About Nginx, Nginx installation

About Nginx Nginx official website nginx.org, the latest version 1.13, the latest stable version 1.12, nginx application scenario: Web services, reverse proxy, load balancing, nginx famous branch, Tengine developed by Taobao based on nginx, which is consistent with nginx in use, the service name and configuration fi ...

Posted on Fri, 01 May 2020 13:55:02 -0400 by baruch

Chapter 2: regular expressions and Cookie usage

1. Atomic concept Atom is the basic unit of regular expression import re #Ordinary characters as atoms pattern = "baidu" string = "http://www.baidu.com" result=re.search(pattern,string) print(result) import re #Nonprint characters (. Control symbols) as atoms pattern = "\n"#Line break string = """http://www.baidu.com http:www.so.com""" ...

Posted on Fri, 01 May 2020 11:15:05 -0400 by bodge

linux learning notes 26 - building a discoz (2)

Set up the discoz (2) 3. Configure user authentication Write the following to httpd-vhosts.conf:<Directory *> AllowOverride AuthConfig AuthName "Custom text" AuthType Basic AuthUserFile /data/.htpasswd require valid-user </Directory> . htpasswd needs to be created with / usr/local/apache2/bin/htpasswd;/usr/local/ap ...

Posted on Fri, 01 May 2020 07:10:14 -0400 by brax23