jeudi 3 mai 2018

Error in calling URL using AJAX

I am trying to call a file (sms.php) which is in xampp/htdocs directory. I want to access that file from my laravel project. It mentions that my laravel project folder also on that directory. I want to call that using ajax. My code shows http://localhost:8000/localhost/sms.php . (Checked using inspect and console) .How can I fix it ? Thanks in advance.

<script>

  $.ajax({
     url: 'localhost/sms.php',
     type: "get",
     data: {},
      success: function(data){ 
      alert('ok');
  }
});

 </script>



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire