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
1 How to define common file separator symbols for linux and window s
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
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
942. DI String Match
942. DI String Match
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
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
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 email@example.com on Mon, 18 Mar 2019 09:03:27 -0700
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
[root@lnmp mysql]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)
[root@lnmp mysql]# uname -r
Official Download Address
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
Configuration directory structure
# 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
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