久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<tfoot id='xFU26'></tfoot>
    <legend id='xFU26'><style id='xFU26'><dir id='xFU26'><q id='xFU26'></q></dir></style></legend>

  1. <small id='xFU26'></small><noframes id='xFU26'>

    <i id='xFU26'><tr id='xFU26'><dt id='xFU26'><q id='xFU26'><span id='xFU26'><b id='xFU26'><form id='xFU26'><ins id='xFU26'></ins><ul id='xFU26'></ul><sub id='xFU26'></sub></form><legend id='xFU26'></legend><bdo id='xFU26'><pre id='xFU26'><center id='xFU26'></center></pre></bdo></b><th id='xFU26'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='xFU26'><tfoot id='xFU26'></tfoot><dl id='xFU26'><fieldset id='xFU26'></fieldset></dl></div>

      • <bdo id='xFU26'></bdo><ul id='xFU26'></ul>

      Ext.JSON.decode():您正在嘗試解碼無效的 JSON 字符串

      Ext.JSON.decode(): You#39;re trying to decode an invalid JSON String(Ext.JSON.decode():您正在嘗試解碼無效的 JSON 字符串)

        <small id='JEv8l'></small><noframes id='JEv8l'>

        <tfoot id='JEv8l'></tfoot>

            • <bdo id='JEv8l'></bdo><ul id='JEv8l'></ul>
              <i id='JEv8l'><tr id='JEv8l'><dt id='JEv8l'><q id='JEv8l'><span id='JEv8l'><b id='JEv8l'><form id='JEv8l'><ins id='JEv8l'></ins><ul id='JEv8l'></ul><sub id='JEv8l'></sub></form><legend id='JEv8l'></legend><bdo id='JEv8l'><pre id='JEv8l'><center id='JEv8l'></center></pre></bdo></b><th id='JEv8l'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='JEv8l'><tfoot id='JEv8l'></tfoot><dl id='JEv8l'><fieldset id='JEv8l'></fieldset></dl></div>
              <legend id='JEv8l'><style id='JEv8l'><dir id='JEv8l'><q id='JEv8l'></q></dir></style></legend>

                  <tbody id='JEv8l'></tbody>
              1. 本文介紹了Ext.JSON.decode():您正在嘗試解碼無效的 JSON 字符串的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我對此很陌生,并且自 2 周以來一直在努力解決我的問題,希望您能提供幫助.

                I'm pretty new at this and have been trying to fix my problem since 2 weeks now hope you can help.

                我的 json 輸出似乎無效,但我不確定我的問題是來自我的 php 還是我的 extjs 腳本.

                It seems my json output is not valid but I'm not sure if my problem is coming from my php or my extjs script.

                我有一個組合框,當我點擊它時應該會顯示一個選擇列表.該列表基本上來自 Sql 表.

                I have a combo box wich should show me a list of choice when I click on it. The list is basically comming from a Sql table.

                當我在 Chrome 中檢查我的控制臺時,我看到了我的輸出,看起來不錯.

                When I check in my console in Chrome I see my output and it seems fine.

                ext-all-rtl-debug.js?_dc=1525825768241:10025 [E] Ext.JSON.decode(): You're trying to decode an invalid JSON String: Connection to DB succeed    
                        [{"id":"3","businessunit":"kappa"}] 
                

                我應該看到 kappa 并且能夠選擇它,但我沒有任何東西,只是 json 錯誤.

                I should see kappa and be able to select it but I have nothing just the json error.

                這是我的 php:

                    <?php
                    require_once"..//..//_includes/headers.php";
                
                
                $query = "select id, businessunit from Team_tab order by businessunit";
                logit($query);
                $result = odbc_exec($connection,$query);
                while($row = odbc_fetch_array($result))
                    {
                    $myArray[] = array(
                        'id'=>$row['id'],
                        'businessunit'=>$row['businessunit'],
                        );
                
                
                    }
                
                    if (isset($myArray))
                    {
                        if ( sizeof($myArray) > 0 )
                        {
                            $output = json_encode($myArray);
                            echo $output;
                        }
                        else
                        {
                            echo '(success:true,"error":0)';    
                        }
                    }
                    else
                        {
                            echo '(success:true,"error":0)';
                        }
                
                    ?>
                

                這是我的 extjs:

                And heres my extjs:

                Ext.define('EmpMen.view.Employee.CreateEmployee', {
                        extend: 'Ext.window.Window',
                        alias: 'widget.employee.createemployee',
                
                    requires: [
                        'EmpMen.view.Employee.CreateEmployeeViewModel',
                        'EmpMen.view.Employee.CreateEmployeeViewController',
                        'Ext.form.Panel',
                        'Ext.form.field.ComboBox',
                        'Ext.button.Button'
                    ],
                
                    controller: 'employee.createemployee',
                    viewModel: {
                        type: 'employee.createemployee'
                    },
                    reference: '',
                    height: 325,
                    itemId: 'createEmployee',
                    width: 364,
                    title: 'Enter Employee Information',
                
                    layout: {
                        type: 'vbox',
                        align: 'stretch'
                    },
                    items: [
                        {
                            xtype: 'form',
                            flex: 1,
                            height: 170,
                            padding: 10,
                            width: 360,
                            bodyPadding: 10,
                            title: '',
                            items: [
                                {
                                    xtype: 'textfield',
                                    anchor: '100%',
                                    reference: 'first',
                                    itemId: 'first',
                                    fieldLabel: 'First Name'
                                },
                                {
                                    xtype: 'textfield',
                                    anchor: '100%',
                                    reference: 'last',
                                    itemId: 'last',
                                    fieldLabel: 'Last Name'
                                },
                                {
                                    xtype: 'textfield',
                                    anchor: '100%',
                                    reference: 'tle',
                                    itemId: 'tle',
                                    fieldLabel: 'Title'
                                },
                                {
                                    xtype: 'combobox',
                                    anchor: '100%',
                                    reference: 'bunit',
                                    fieldLabel: 'Business Unit',
                                    displayField: 'businessunit',
                                    valueField: 'id',
                                    bind: {
                                        store: '{businessunit}'
                                    }
                                },
                                {
                                    xtype: 'textfield',
                                    anchor: '100%',
                                    reference: 'exp',
                                    itemId: 'exp',
                                    fieldLabel: 'Experience'
                                },
                                {
                                    xtype: 'container',
                                    margin: 10,
                                    layout: {
                                        type: 'hbox',
                                        align: 'stretch',
                                        pack: 'center'
                                    },
                                    items: [
                                        {
                                            xtype: 'button',
                                            flex: 1,
                                            reference: 'employeeForm',
                                            maxWidth: 100,
                                            width: '',
                                            text: 'Save',
                                            listeners: {
                                                click: 'onButtonClick'
                                            }
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    listeners: {
                        afterrender: 'onCreateEmployeeAfterRender'
                    }
                
                });
                

                推薦答案

                來源: https://docs.sencha.com/extjs/6.0.2/modern/src/JSON.js.html#Ext.JSON 方法解碼

                根據發生錯誤的 Ext.JSON.decode 方法的來源,PHP 的響應應如下:

                According to the Ext.JSON.decode method's source where the error is occurring, the response from PHP should be following :

                Connection to DB succeed    
                    [{"id":"3","businessunit":"kappa"}]
                

                這不是有效的 JSON 響應.應該是:

                This is not a valid JSON response. It should be :

                [{"id":"3","businessunit":"kappa"}]
                

                根據提供的消息來源,我懷疑連接到數據庫成功"附加字符串應該來自的唯一地方是:

                According to the source provided, I suspect the only place from where "Connection to DB succeed" additional string should be coming is :

                require_once"..//..//_includes/headers.php";
                

                從 headers.php 中刪除 echo 語句連接到數據庫成功".

                這篇關于Ext.JSON.decode():您正在嘗試解碼無效的 JSON 字符串的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                PHP PDO ODBC connection(PHP PDO ODBC 連接)
                Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)
                1. <i id='HWXfq'><tr id='HWXfq'><dt id='HWXfq'><q id='HWXfq'><span id='HWXfq'><b id='HWXfq'><form id='HWXfq'><ins id='HWXfq'></ins><ul id='HWXfq'></ul><sub id='HWXfq'></sub></form><legend id='HWXfq'></legend><bdo id='HWXfq'><pre id='HWXfq'><center id='HWXfq'></center></pre></bdo></b><th id='HWXfq'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='HWXfq'><tfoot id='HWXfq'></tfoot><dl id='HWXfq'><fieldset id='HWXfq'></fieldset></dl></div>

                        • <bdo id='HWXfq'></bdo><ul id='HWXfq'></ul>
                            <tbody id='HWXfq'></tbody>

                          <tfoot id='HWXfq'></tfoot>

                          <legend id='HWXfq'><style id='HWXfq'><dir id='HWXfq'><q id='HWXfq'></q></dir></style></legend>

                          <small id='HWXfq'></small><noframes id='HWXfq'>

                          主站蜘蛛池模板: 日韩精品色网 | 秋霞电影院午夜伦 | 亚洲免费久久久 | 久久久久九九九女人毛片 | 国产一区二区影院 | 日本高清精品 | 中文字幕免费视频 | 亚洲一区二区免费 | 日韩精品1区2区 | 日韩精品在线视频免费观看 | 91精品国产乱码麻豆白嫩 | 欧美精品一二三 | 精品无码久久久久久久动漫 | 亚洲视频中文字幕 | aaaa网站 | 久久新视频| 麻豆a级片| 亚洲热在线视频 | 亚洲欧洲综合av | 中文字幕在线一 | xx性欧美肥妇精品久久久久久 | 91精品国产综合久久精品图片 | 一区二区免费 | 日韩视频在线一区 | av网站在线播放 | 黄色一级电影在线观看 | 久久久久久国模大尺度人体 | 97精品国产97久久久久久免费 | 一区二区三区在线电影 | 在线观看的av | 日本高清aⅴ毛片免费 | 欧美三级视频 | 美人の美乳で授乳プレイ | 欧美久久精品一级黑人c片 91免费在线视频 | 亚洲成人综合网站 | 国产激情一区二区三区 | 久久国产日韩 | 一本一道久久a久久精品综合 | 色婷婷激情| 中文字幕不卡视频在线观看 | 久久精品69 |