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

WBOY
发布: 2016-07-20 11:13:29
原创
1352 人浏览过




<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
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板