I created a new folder in my application
directory called scripts
.
The path to this folder is [::1]/development/application/scripts/
. I would like to make ajax requests to script files in this folder.
Here is my request:
$.ajax({
type: "GET",
url: "<?=site_url('application/scripts/center_contacts_server_processing.php')?>",
success: function(resp) {
console.log(resp)
}
});
console.log("<?=site_url('application/scripts/center_contacts_server_processing.php')?>");
center_contacts_server_processing.php
<?php
echo 'hi';
?>
And the output:
http://[::1]/development/application/scripts/center_contacts_server_processing.php
http://[::1]/development/application/scripts/center_contacts_server_processing.php 403 (Forbidden)
Note: I use ajax all around my site but I usually call controllers.