Severity: Warning
Message: mysqli::real_connect(): (HY000/2002): Cannot assign requested address
Filename: mysqli/mysqli_driver.php
Line Number: 201
Backtrace:
File: /www/wwwroot/dash.konsole.xyz/application/core/MY_Controller.php
Line: 343
Function: __construct
File: /www/wwwroot/dash.konsole.xyz/application/controllers/Api.php
Line: 12
Function: __construct
File: /www/wwwroot/dash.konsole.xyz/index.php
Line: 316
Function: require_once
无法使用提供的设置连接到数据库服务器。
Filename: core/MY_Controller.php
Line Number: 343
<?php
namespace HelloTheme\Includes;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
class Script {
protected string $handle;
protected array $dependencies;
public function __construct( string $handle, array $dependencies = [] ) {
$this->handle = $handle;
$this->dependencies = $dependencies;
}
public function enqueue() {
$asset_path = HELLO_THEME_SCRIPTS_PATH . $this->handle . '.asset.php';
$asset_url = HELLO_THEME_SCRIPTS_URL;
if ( ! file_exists( $asset_path ) ) {
throw new \Exception( $asset_path . ' - You need to run `npm run build` for the "hello-elementor" first.' );
}
$script_asset = require $asset_path;
foreach ( $this->dependencies as $dependency ) {
$script_asset['dependencies'][] = $dependency;
}
wp_enqueue_script(
$this->handle,
$asset_url . "$this->handle.js",
$script_asset['dependencies'],
$script_asset['version'],
true
);
\wp_set_script_translations( $this->handle, 'hello-elementor' );
}
}