Error

PHP Notice亚博体育yabo88_yabo亚博_yabo亚博体育苹果

Undefined offset: 8

  • 1. in /home/www/ririagnew/common/utility/Market.php at line 95
    8687888990919293949596979899100101102103104
                    */
     
     
                    list($msec, $sec) = explode(' ', microtime());
                    $msectime = (float)sprintf('%.0f', (floatval($msec) + floatval($sec)) * 1000);
                    $url    ="https://hq.sinajs.cn/?_=".$msectime."/&list=nf_AG".$agtype;
                    $shanghai = Curl::httpsRequest($url);
                    $shanghai = str_replace(['var hq_str_nf_AG'.$agtype.'=','"',';'],'',$shanghai);
                    $shanghai_json = explode(",",$shanghai);
                    $ag1706 = $shanghai_json[8];
     
     
     
                    $shanghai_arr  = json_encode(array('Last'        =>intval($shanghai_json[8]),//上期所白银价格
                        'LastClose'   =>intval($shanghai_json[10]),//上次停盘价格
                        'Ask1'        =>intval($shanghai_json[7]),//买价
                        'Bid1'        =>intval($shanghai_json[8]),//卖价
                        'updateTime1' =>intval($shanghai_json[17]),//成交时间年月日
                        'updateTime2' =>intval($shanghai_json[17])));//成交时间时分秒
    
  • 2. in /home/www/ririagnew/common/utility/Market.php at line 95 yii\base\ErrorHandler::handleError(8, 'Undefined offset: 8', '/home/www/ririagnew/common/utili...', 95, ...)
    8990919293949596979899100101
                    list($msec, $sec) = explode(' ', microtime());
                    $msectime = (float)sprintf('%.0f', (floatval($msec) + floatval($sec)) * 1000);
                    $url    ="https://hq.sinajs.cn/?_=".$msectime."/&list=nf_AG".$agtype;
                    $shanghai = Curl::httpsRequest($url);
                    $shanghai = str_replace(['var hq_str_nf_AG'.$agtype.'=','"',';'],'',$shanghai);
                    $shanghai_json = explode(",",$shanghai);
                    $ag1706 = $shanghai_json[8];
     
     
     
                    $shanghai_arr  = json_encode(array('Last'        =>intval($shanghai_json[8]),//上期所白银价格
                        'LastClose'   =>intval($shanghai_json[10]),//上次停盘价格
                        'Ask1'        =>intval($shanghai_json[7]),//买价
    
  • 3. in /home/www/ririagnew/common/utility/Market.php at line 186 – common\utility\Market::getShfeAgData()
    180181182183184185186187188189190191192
            return $jsoninfo;
        }
     
        //获取TD和期银主力数据
        static public function getReferPrice() {
     
            $futuresArr   = Market::getShfeAgData(); //
            $tdArr        = Market::getGoldExchangeAgData();
            $tdPrice      = $tdArr["Last"];
            $futuresPrice = $futuresArr["Last"];
            $referPrice   = [
                'td'       => $tdPrice,
                'futures'  => $futuresPrice,
    
  • 4. in /home/www/ririagnew/common/models/PriceStatis.php at line 302 – common\utility\Market::getReferPrice()
    296297298299300301302303304305306307308
        public static function getAveragePrice($dateType, $type = 0, $cityType = 0)
        {
     
          $cityType = 0;// 默认开票
            $res = [];
     
            $price = Market::getReferPrice();//td价格
            switch($type) {
                case 0:
     
                //查询今日挂牌均价
                $arr_guaprice = PriceStatis::find()
                    ->select(['id', 'price', 'average', 'time'])
    
  • 5. in /home/www/ririagnew/frontend/controllers/SiteController.php at line 264 – common\models\PriceStatis::getAveragePrice(0, 0, 0)
    258259260261262263264265266267268269270
            $directexp = Cache::get("catch_direct_exp_new");
            if (empty($directexp)) {
                $directexp = '--';
            }
     
            //挂牌均价 和 成交均价
            $arr_price = PriceStatis::getAveragePrice(PriceStatis::DATETYPE_DAY, 0, 0);
            //成交信息, 首页交易热度中排除 不开票 的挂单
            $time_scope = strtotime('-7 day');  //7天内数据
     
            $orderdeal = DirectOrder::find()->where(['>=', 'create_time', $time_scope])->select(['order_id', 'brand_name', 'weight', 'create_time'])->limit(7)->all();
     
            foreach($orderdeal as $k=>$v)
    
  • 6. frontend\controllers\SiteController::actionIndex()
  • 7. in /home/www/ririagnew/vendor/yiisoft/yii2/base/InlineAction.php at line 55 – call_user_func_array([frontend\controllers\SiteController, 'actionIndex'], [])
    495051525354555657
            $args = $this->controller->bindActionParams($this, $params);
            Yii::trace('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__);
            if (Yii::$app->requestedParams === null) {
                Yii::$app->requestedParams = $args;
            }
     
            return call_user_func_array([$this->controller, $this->actionMethod], $args);
        }
    }
    
  • 8. in /home/www/ririagnew/vendor/yiisoft/yii2/base/Controller.php at line 151 yii\base\InlineAction::runWithParams([])
    145146147148149150151152153154155156157
            }
     
            $result = null;
     
            if ($runAction && $this->beforeAction($action)) {
                // run the action
                $result = $action->runWithParams($params);
     
                $result = $this->afterAction($action, $result);
     
                // call afterAction on modules
                foreach ($modules as $module) {
                    /* @var $module Module */
    
  • 9. in /home/www/ririagnew/vendor/yiisoft/yii2/base/Module.php at line 455 yii\base\Controller::runAction('', [])
    449450451452453454455456457458459460461
            $parts = $this->createController($route);
            if (is_array($parts)) {
                /* @var $controller Controller */
                list($controller, $actionID) = $parts;
                $oldController = Yii::$app->controller;
                Yii::$app->controller = $controller;
                $result = $controller->runAction($actionID, $params);
                Yii::$app->controller = $oldController;
     
                return $result;
            } else {
                $id = $this->getUniqueId();
                throw new InvalidRouteException('Unable to resolve the request "' . ($id === '' ? $route : $id . '/' . $route) . '".');
    
  • 10. in /home/www/ririagnew/vendor/yiisoft/yii2/web/Application.php at line 84 yii\base\Module::runAction('', [])
    78798081828384858687888990
                $params = $this->catchAll;
                unset($params[0]);
            }
            try {
                Yii::trace("Route requested: '$route'", __METHOD__);
                $this->requestedRoute = $route;
                $result = $this->runAction($route, $params);
                if ($result instanceof Response) {
                    return $result;
                } else {
                    $response = $this->getResponse();
                    if ($result !== null) {
                        $response->data = $result;
    
  • 11. in /home/www/ririagnew/vendor/yiisoft/yii2/base/Application.php at line 375 yii\web\Application::handleRequest(yii\web\Request)
    369370371372373374375376377378379380381
            try {
     
                $this->state = self::STATE_BEFORE_REQUEST;
                $this->trigger(self::EVENT_BEFORE_REQUEST);
     
                $this->state = self::STATE_HANDLING_REQUEST;
                $response = $this->handleRequest($this->getRequest());
     
                $this->state = self::STATE_AFTER_REQUEST;
                $this->trigger(self::EVENT_AFTER_REQUEST);
     
                $this->state = self::STATE_SENDING_RESPONSE;
                $response->send();
    
  • 12. in /home/www/ririagnew/frontend/web/index.php at line 18 yii\base\Application::run()
    12131415161718
        require(__DIR__ . '/../../common/config/main-local.php'),
        require(__DIR__ . '/../config/main.php'),
        require(__DIR__ . '/../config/main-local.php')
    );
     
    $application = new yii\web\Application($config);
    $application->run();
    
  • $_SERVER = [
        'USER' => 'apache',
        'HOME' => '/usr/share/httpd',
        'FCGI_ROLE' => 'RESPONDER',
        'QUERY_STRING' => '',
        'REQUEST_METHOD' => 'GET',
        'CONTENT_TYPE' => '',
        'CONTENT_LENGTH' => '',
        'SCRIPT_NAME' => '/index.php',
        'REQUEST_URI' => '/',
        'DOCUMENT_URI' => '/index.php',
        'DOCUMENT_ROOT' => '/home/www/ririagnew/frontend/web',
        'SERVER_PROTOCOL' => 'HTTP/1.1',
        'REQUEST_SCHEME' => 'http',
        'GATEWAY_INTERFACE' => 'CGI/1.1',
        'SERVER_SOFTWARE' => 'nginx/1.10.2',
        'REMOTE_ADDR' => '154.88.78.81',
        'REMOTE_PORT' => '20000',
        'SERVER_ADDR' => '139.196.198.104',
        'SERVER_PORT' => '80',
        'SERVER_NAME' => 'www.ririag.com',
        'REDIRECT_STATUS' => '200',
        'SCRIPT_FILENAME' => '//home/www/ririagnew/frontend/web/index.php',
        'HTTP_USER_AGENT' => 'Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)',
        'HTTP_HOST' => 'www.ririag.com',
        'HTTP_ACCEPT' => '*/*',
        'HTTP_ACCEPT_ENCODING' => 'deflate, gzip',
        'PHP_SELF' => '/index.php',
        'REQUEST_TIME_FLOAT' => 1621024808.9374,
        'REQUEST_TIME' => 1621024808,
    ];