首頁 > 後端開發 > php教程 > ecshop提交订单时提示“您的购物车中没有商品”——解决方案_PHP教程

ecshop提交订单时提示“您的购物车中没有商品”——解决方案_PHP教程

WBOY
發布: 2016-07-20 11:13:29
原創
1365 人瀏覽過




<span <span  1</span> <span /*</span><span *
</span><span  2</span> <span      * 检查cookie
</span><span  3</span> <span      *
</span><span  4</span> <span      * @access  public
</span><span  5</span> <span      * @param
</span><span  6</span> <span      *
</span><span  7</span> <span      * @return void
</span><span  8</span>      <span */</span>
<span  9</span>     <span function</span><span  check_cookie ()
</span><span 10</span> <span     {
</span><span 11</span>         <span if</span> ( <span isset</span>(<span $_COOKIE</span>['ECS'])  && <span isset</span>(<span $_COOKIE</span>['ECS']['user_id'])  && <span isset</span>(<span $_COOKIE</span>['ECS']['password'<span ]))
</span><span 12</span> <span         {
</span><span 13</span>       <span $ecs_user_id</span>   = <span $_COOKIE</span>['ECS']['user_id'<span ];
</span><span 14</span>    <span $ecs_user_pass</span> = <span $_COOKIE</span>['ECS']['password'<span ];
</span><span 15</span>             <span $sql</span> = "SELECT " . <span $this</span>->field_name ." AS user_name".
<span 16</span>                    " FROM " . <span $this</span>->table(<span $this</span>->user_table) .
<span 17</span>                    " WHERE ".<span $this</span>->field_id." = '<span $ecs_user_id</span>' AND ".<span $this</span>->field_pass." = '<span $ecs_user_pass</span>'"<span ;
</span><span 18</span>             <span $username</span> = <span $this</span>->db->getOne(<span $sql</span><span );
</span><span 19</span>             <span if</span> (<span $username</span> && (<span $this</span>->charset != 'UTF8'<span ))
</span><span 20</span> <span             {
</span><span 21</span>                 <span $username</span> = ecs_iconv(<span $this</span>->charset, 'UTF8', <span $username</span><span );
</span><span 22</span> <span             }
</span><span 23</span>             <span return</span> <span $username</span><span ;
</span><span 24</span> <span         }
</span><span 25</span>         <span else</span>
<span 26</span> <span         {
</span><span 27</span>             <span return</span> ''<span ;
</span><span 28</span> <span         }
</span><span 29</span>     }</span>
登入後複製

 

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/440371.htmlTechArticle( ( ['ECS']) ( ['ECS']['user_id']) ( ['ECS']['password' = ['ECS']['user_id' = ['ECS']['password' = "SELECT " . -field_name ." AS user_name". " FROM " . -table( -user_table) . " WHE...
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板