用PHP休息

I am very new to PHP. I wanted to call restful api in PHP. I am doing same in jQuery as below

var url;
url = "https://www.example.com/_api/lists/getbytitle('Stations')/items?$select=CityCode,CityNameEN&$filter=Active eq 'Yes'&$orderby=CityNameEN";
        $.ajax({
            url: url,
            method: "GET",
            headers: { "Accept": "application/json; odata=verbose" },
            async: false,
            success: function (data) {
                $.each(data.d.results, function (i, item) {

                });
            }
        });

How can I do same in PHP. I have two difficulties. First in URL there is $ sign which PHP assume as variable and other I don't know how to do that

查看全部
duanpai6581
duanpai6581
2017/03/20 07:28
  • php
  • jquery
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

2个回复