I'm trying to use an ajax request on a php file hosted on an URL. And i can't retrive datas from it.
My code :
Ajax request :
$.ajax({
type: "GET",
url: "http://urltomysite.com/api/discogs/search.php",
datatype: "html",
data: dataString,
success: function(data) {
console.log(data);
}
});
Php file :
<?php
echo 'i am a string';
?>
the console log just returns nothing.
Is someone have an idea to solve my problem?