Making PATHINFO Mode Function Similar to ThinkPHP Framework (2)

From the last release< Making PATHINFO Mode Function Similar to ThinkPHP Framework (Article address: http://www.cnblogs.com/phpstudy2015-6/p/6242700.html ) It's been many days, so let's finish the rest tonight. The previous article has implemented the PATHINFO mode URL, that is, when we visit the site built by MVC mode, we only need to add ( ...

Posted by scarhand on Thu, 21 Mar 2019 01:36:52 -0700

Share some of the inquiries and techniques encountered in php work [2]

1 How to define common file separator symbols for linux and window s DIRECTORY_SEPARATOR :   The directory separator is the built-in constant that defines php. On debugging machines, we used to use "" as a file separator in windows, but on linux, the system does not recognize this identifier, so we need to introduce the PHP built-in c ...

Posted by mattsutton on Wed, 20 Mar 2019 21:33:27 -0700

PHP - Generating thumbnails and adding watermarks - Learning Notes

1. start Thumbnail function is often used in the process of uploading pictures on websites. Here I have written an Image class for Image processing, which can generate thumbnails and add watermarks.   2. How to generate thumbnails The key to generating thumbnails is how to calculate the scaling ratio. Here, based on several common changes ...

Posted by DeathStar on Wed, 20 Mar 2019 21:00:27 -0700

Leetcode PHP Problem--D10 942. DI String Match

942. DI String Match Title Link 942. DI String Match Title Analysis Given a string S containing only I and D, an array is returned. This number satisfies the following conditions: When S[i] is I, A [i] < A [i + 1]. The latter number is larger than the former. When S[i] is D, A [i] > A [i + 1]. The number in front is bigger than that in ...

Posted by Dave Liebman on Wed, 20 Mar 2019 07:30:53 -0700

Understanding of PHP callback functions call_user_func and call_user_func_array()

call_user_func(function,param); // The first parameter is the function name of the callback function, and the second parameter is the parameter.    The call_user_func function is similar to a special method of calling functions. Its main types are as follows: 1. Call a named function 2. Calling anonymous functions 2. Method of call ...

Posted by aarbrouk on Mon, 18 Mar 2019 19:45:27 -0700

Different nginx error reporting "Primary script unknown"

Last night, I forgot to make any changes to the development environment, which led to nginx prompting "Primary script unknown" when debugging the interface today. In most cases, this is a very simple problem: script_filename error in nginx configuration. However, I checked my nginx configuration and found nothing wrong. location ~ \.p ...

Posted by philip@hux.co.za on Mon, 18 Mar 2019 09:03:27 -0700

Simple Understanding of call_user_func() and call_user_func_array() in PHP

Original address: http://small.aiweimeng.top/index.php/archives/52.html call_user_func: Call a parameter as a callback function Description of usage: call_user_func ( callable $callback [, mixed $parameter [, mixed $... ]] ) : mixed    Description of parameters: The first parameter, $callback, is used as the callback function, ...

Posted by yujikaido on Thu, 14 Mar 2019 20:48:25 -0700

CentOS 7 installs LNMP (nginx 1.14.2, MariaDB 10.3.13, php7.3.3)

Preface System environment [root@lnmp mysql]# cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core) [root@lnmp mysql]# uname -r 3.10.0-514.el7.x86_64 Official Download Address mariadb database php ngixn Install MariaDB 10.3.13 1. Download mariadb binary packageBecause the compilation time of source packages is too long, the binary pa ...

Posted by asuamol on Sat, 09 Mar 2019 22:12:25 -0800

Dockerfile Building PHP Development Mirror: Alpine+Nginx+PHP7+Supervisor+Crontab+Laravel

Configuration directory structure 1.1 crontabs # do daily/weekly/monthly maintenance # min hour day month weekday command # * * * * * /usr/bin/php /usr/share/nginx/html/artisan schedule:run >> /dev/null 2>&1 Tips: In general, the production environment is load balancing. Timing t ...

Posted by sammon96 on Wed, 06 Mar 2019 17:21:23 -0800

laravel5.5 - Middleware

As a request and response filter, Middleware in laravel has two main functions. 1. Intercept and filter requests before they reach the controller layer. Only validated requests can reach the controller layer. 2. Or filter the data or page response that has been computed in the controller before it returns, and the response that has been v ...

Posted by ForgotMyPass on Tue, 26 Feb 2019 02:27:22 -0800