i have little problem with $.ajax in jquery. I am calling file response.php but i am getting response from index.php.
Files structure:
libs/response.php
js/main.js
...
index.php
Index.php
<!DOCTYPE html>
<html>
<head>
...
<button id="bttClick">click</button>
...
</html>
Main.js
$('#bttClick').click(function(){
$.ajax({
'url': 'libs/response.php',
'type':'POST',
'data': arr
}).done(function(resp){
alert(resp);
});
});
Response.php
<?
echo "ECHO";
?>
Anyone can help? Thanks
Answer: .htaccess