angularjs php文件不执行

i'm trying to execute a promise in angular, this is my service code :

var carsService = function ($http, $q, $log, $rootScope) {
    var service = this;

    service.getInfo = function () {

        var defer = $q.defer();

        $http.get($rootScope.endPoint + 'cars.php?load=t')
            .success(function (data) {
                defer.resolve(data);
            })
            .error(function (data, status, headers, config) {
                defer.reject({
                    n: 1000,
                    msj: 'some error msg'
                });
                $log.log(data + ' ' + status + ' ' + headers + ' ' + config);
            });

        return defer.promise;
    };
};

and this is how i called from my controller :

CarsService.getInfo()
            .then(function (data) {
                console.log(data);
            }, function (err) {
                swal("ERROR", "some error msg.", "error");
            }
        );

and this is my cars.php file :

<?php
  var $r = array('a'=>1,'b'=>2);
  print json_encode($r);
?>

what i'm expecting is the console print an array , but what i get is the php code printed.

enter image description here

PHP is running :

enter image description here

I tried with POSTMAN too :

enter image description here

Any ideas guys ???? thanks ...

Your $rootScope.endPoint variable is probably incorrect.

The GET call in PostMan is made to localhost:63342 (Webstorm LiveEdit?) and XAMPP is running at localhost:8090. The cars.php file has to be executed on your Apache server and the GET call has to be directed to localhost:8090/path_to_cars.php.