Ajax php文件调用失败

I had this script working, to replace a target element in the DOM with the content of "sample.html" file:

$('.ajaxtrigger').click(function(){
$('#loading').show();
$('#target').load('sample.html', function() {
$('#loading').hide();
});

After that, I needed to transform sample.html in sample.php because I must call some functions in it. The above script doesn't work now, if a simply replace 'sampe.html' with 'sample.php'..

Ajax doesn't call its content anymore

Have you tried visiting the 'sample.php' page individually? Perhaps you have a syntax error or something more sinister like PHP is not working/installed on your server.