You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- <?php
- /*
- Author:ZSQ
- Compeny:Spiders Travel
- */
- require_once '../Common/Mysql.php';
- //if (ALLOW_ORIGIN)
- header("Access-Control-Allow-Origin:*");
- //$USER_ID=isset($_GET['user_id'])?$_GET['user_id']:'';
- $productName=isset($_GET['productName'])?$_GET['productName']:'';
- $user_id=getUserId();
- if ($user_id ===false){
- echo json_encode(array("errcode"=>1,"errinfo"=>"用户未登录"));
- exit;
- }
-
-
- $pdo=conn();
- $sql="CALL HT_GET_PRODUCTNAMES_BY_SEARCH('".$productName."')";
- $result=$pdo->query($sql);
- $rowset=$result->fetchAll(PDO::FETCH_ASSOC);
- //if(strlen(trim($USER_ID))<=0){
- // $data['code']='1';
- // $data['info']='未登录';
- //}else{
- $data['code']='0';
- $data['info']='';
- $data['pro_names']=$rowset;
- //}
- echo json_encode($data);
- exit();
|