Category: Programming Language
-
Post Views: 28 1. Reference:Based on Alibaba Cloud’s ECS and RDS, the personal blog migration has been upgraded to: Docker (based on budget considerations, ultimately not realized), LNMP (CentOS 7.7, Nginx 1.16, MySQL 5.7, PHP 7.4), the process of HTTPS , the previous environment was based on the automatic installation of OneInstack. PHP version 7.4 is no longer eligible for…
-
Post Views: 17 1. When installing the php extension, it is stuck at –php_extensions fileinfo. My ECS memory is 1 GB config. Compiling FileInfo takes up a lot of memory, which is the direct cause of incompilation. It was finally decided to improve the configuration of the ECS, and the memory was increased to 2 GB. as shown in Figure…
-
Post Views: 22 1. Reference:Install PHP, its version defaults to PHP 7.4 2. Uninstall PHP 7.4 and its dependencies first 3. Reference:How to install and run PHP 8.x on Ubuntu 20.04. Add the PHP PPA repository. Install PHP 8.1 using the following command. 4. Install PHP 8.1 successfully. as shown in Figure 1
-
Post Views: 36 1. Reference:Install Shopify CLI 3.0 (based on Node.js) in Windows 10 Professional, check in advance whether the corresponding requirements are met . 2. Reference:The requirements in Linux are as follows 3. Node.js is not installed, refer to:Installation . Installation failed. 4. Execute the command: sudo apt-get update 5. Execute the command again: sudo apt-get install -y nodejs,…
-
Post Views: 23 1. Reference:The same CSS file (their ETags are equal), due to the difference in the response’s content-type, leads to the difference in the interface of the web page. Discover the response’s Content-Type based on MIME_CONTENT_TYPE – the MIME type of the detection file, and finally based on the MIME-TYPE detection LEAGUE/MIME-TYPE-detection League/mime-type-detection implementation. Detect according to content,…
-
Post Views: 18 1. The existing time field, its value is: 20231020105244000+0800, it can be known that its format in PHP is: ymdhisvo. Reference:https://www.php.net/manual/zh/datetime.format.php 2. Based on DateTime::CreateFromFormat — date_create_from_format – parse the time string according to the specified format. Print the returned DateTime object. as shown in Figure 1 3. Based on DateTimeInterface::Format — DateTimeImmutable::Format — DateTime::Format — Date_Format…
-
Post Views: 13 1. In Laravel 6, there is a simple implementation based on the judgment that the string contains ? 2. However, this implementation, some complex URIs are not considered. Example: ?d=3&e=5#6, will be replaced with: ?d=3&e=5#6&d=https://xxx.com. 3. The final decision is to add query parameters based on the League/URI, and execute the composer require League/uri-components and composer require…
-
Post Views: 15 1. The route of a requesting resource file is as follows: /static/xxx/9915995c-2952-4 90c-8e51-037a0950233c/assets/js/react.f886be.js 2. Since / is included in asset_key. Laravel routing components allow all characters except / . You must explicitly allow / to be part of a placeholder using the WHERE conditional regular expression. Otherwise, the route will fall back. The routes/web.php file is used…