I basically have an ajax call to a php file:
$("#acceptBtn").click(function(){
$.ajax({
type: "POST",
url:"acceptOfferFunction.php",
data: {hash2: getURLParameter('hash2')},
success:function(result){
alert(result);
}
});
And for the sake of clarity here's the reduced version of that file illustrating the problem:
<?php
session_start();
//require_once 'AcceptAnOfferFromEditor.php';
echo('foo');
?>
This works, 'foo' gets alerted, but should I uncomment the require_once
statement, it doesn't anymore.
The included file is a php class with many functions. It would be convenient to able to call them.
There is likely an error in your required file. Enable error reporting to debug this:
<?php
session_start();
ini_set('display_errors', 1);
error_reporting(E_ALL);
require_once 'AcceptAnOfferFromEditor.php';
echo('foo');
Alternatively there might be a die()
or exit
call in the file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With