Tag: Code
-
Post Views: 49 The correct display of code blocks is critical when writing a technical blog. Recently, I’m having trouble with code blocks using the WordPress Gutenberg editor, and I’m struggling to find a better solution. After repeated exploration, I finally summed up a complete set of ‘from manual to automatic’ complete plan, which can not only solve the problem…
-
Post Views: 33 1. — `Official-Website-Management-System`.recommendation_slots definition There are two tables for the existing recommendation bits and recommendation bit data. There is also an initialization script of the recommended bit, the code is implemented as follows: Implemented logic to add or update based on Alias, and Alias has a fixed correspondence with the ID. In the code, when hardcoded to…
-
Post Views: 30 1. In the background of WordPress, when switching from the code to visualization, it cannot be switched, and the console reports an error: uncaught typeError: _.pluck is not a function. as shown in Figure 1 2. The description code uses _.pluck(), but the currently loaded version of the underscore.js has been removed. However, some old plugins, themes,…
-
Post Views: 17 1. When implementing a request based on guzzle, php http client, when the response is not 20x, the $response variable cannot be obtained. as shown in Figure 1 2. At this stage, it is necessary to judge the value of the field status in the response, so as to do subsequent logical processing. Reference:https://docs.guzzlephp.org/en/stable/request-options.html#http-errors. Set to FALSE…
-
Post Views: 21 1. Timed out while waiting for the machine to boot. The configured (“config.vm.boot_timeout” value) time period. as shown in Figure 1 2. Although the map has been modified to e:/wwwroot/vagrant, it was: ~/code before. Still decide to create a new directory: ~/code 3. Run again: vagrant reload –provision, no more errors.
-
Post Views: 19 1. In the channel release, an error is reported: sqlstate[01000]: Warning: 1265 data truncatedPUB_LOG_CODEat row 1. as shown in Figure 1 2. SQL error, the root is the table: cpa_pre_pub_log field: pub_log_code type: int(11), but the inserted value is a string: 42s22. as shown in Figure 2 3. Value: 42s22 is taken from: $e->getCode(). as shown in…
-
Post Views: 95 1. In the Google Chrome browser, after today’s Toutiao is opened, it is blank, as shown in Figure 1 2. Check the console, report an error: access to xmlHttpRequest athttps://verify.snssdk.com/reportErrorfrom originhttps://www.toutiao.comHas been blocked by cors policy: request header field ra-ver is not allowed by access-control-allow-headers in preflight Response. As shown in Figure 2 3. Clear browsing data,…