Year: 2023
-
Post Views: 22 1. When the same CSS file (its ETag is equal), the response-type of its response is equal to text/CSS, the web interface is normal. as shown in Figure 1 2. When the same CSS file (its ETag is equal), the response-type of its response is equal to text/plain; charset=utf-8, the web interface is confused. as shown in…
-
Post Views: 20 1. The existing code is implemented as follows 2. Use reference pass to implement in thin code, you can put arr::forget($schema,sections.. $SectionKey ..blocks.. $blockkey); replace with: arr::forget($section,blocks.. $blockkey);
-
Post Views: 22 1. In Laravel 6, the request with query parameters is lost after the 302 jump. as shown in Figure 1 2. The original plan to determine whether the query parameter exists at a specific request. If it exists, it will be automatically brought with it after the 302 jump. However, this scheme cannot be avoided that there…
-
Post Views: 22 1. In a container built based on nginx:alpine, a URL response 404 needs to edit the configuration of nginx to make it respond to 200. as shown in Figure 1 2. After editing the configuration of nginx, you need to reload. Execute the following commands. as shown in Figure 2 3. After reloading, the URL response is…
-
Post Views: 18 1. Reference:In Laravle 6, simulate a route requesting a resource file, and the data is fetched from the database . Request 200 in the local environment. as shown in Figure 1 2. In the production environment, the response is 404 not found (openresty, server: cloudflare). as shown in Figure 2 3. Check the Nginx request log to…
-
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: 18 1. After executing composer require, in composer.lock, plugin-api-version changes from 2.3.0 to 2.2.0 . as shown in Figure 1 2. The plugin-api-version attribute in the file helps ensure compatibility between dependencies and plugins, which is essential for maintaining stability and efficiency. Decided to avoid changes to plugin-api-version as much as possible. Execute composer self-update to update the…