A PHP Error was encountered

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

Database Error

数据库发生错误。

无法使用提供的设置连接到数据库服务器。

Filename: core/MY_Controller.php

Line Number: 343


Fatal error: Uncaught Error: Call to a member function close() on string in /www/wwwroot/dash.konsole.xyz/application/core/MY_Controller.php:349 Stack trace: #0 [internal function]: Index_Controller->__destruct() #1 {main} thrown in /www/wwwroot/dash.konsole.xyz/application/core/MY_Controller.php on line 349
HEX
HEX
Server: Apache/2
System: Linux ns1.websitegang.club 5.4.0-149-generic #166-Ubuntu SMP Tue Apr 18 16:51:45 UTC 2023 x86_64
User: kunchorn (1109)
PHP: 8.2.29
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/kunchorn/domains/kun-chorn.com/private_html/wp-content/plugins/formcraft3/lib/eos/Trig.php
<?php
/**
 * Created by: Jon Lawrence on 2015-07-02 3:10 PM
 */

namespace jlawrence\eos;

/**
 * Class Trig
 * @package jlawrence\Math
 *
 * Trig functions, primarily because there's a difference when dealing with
 * radians and degrees, and this class will help with that - defaulting
 * to radians, but allowing the default to be set to degrees for the
 * project.  Thus simplifying the amount of calculations the user
 * of this project needs to do.
 */
class Trig 
{
    /**
     * @var bool Whether or not to convert to radians before calculation
     * (Meaning input is in degree form)
     */
    public static $DEGREES = false;

    protected static function getRadDeg($x)
    {
        if(self::$DEGREES == true) {
            return deg2rad($x);
        }
        return $x;
    }

    public static function cos($x)
    {
        return cos(self::getRadDeg($x));
    }

    public static function sin($x)
    {
        return sin(self::getRadDeg($x));
    }

    public static function tan($x)
    {
        return tan(self::getRadDeg($x));
    }

    public static function sec($x)
    {
        $tmp = self::cos($x);
        if($tmp == 0)
            throw new \Exception("Division by 0 on: 'sec({$x}) = 1/cos({$x})' in ". Parser::$inFix, Math::E_DIV_ZERO);

        return 1/$tmp;
    }

    public static function csc($x)
    {
        $tmp = self::sin($x);
        if($tmp == 0)
            throw new \Exception("Division by 0 on: 'csc({$x})) = 1/sin({$x})' in ". Parser::$inFix, Math::E_DIV_ZERO);

        return 1/$tmp;
    }

    public static function cot($x)
    {
        $tmp = self::tan($x);
        if($tmp == 0)
            throw new \Exception("Division by 0 on: 'cot({$x})) = 1/tan({$x})' in ". Parser::$inFix, Math::E_DIV_ZERO);

        return 1/$tmp;
    }
}