.get problem with php include
I have a problem with php include and using .get() function. Here's the thing: I have three files test.php, test2.php and test3.php.
In test.php, there is this simple script:
$.get("test2.php",
function(data){
alert(data);
},"json");
File test2.php
- <?php
- include("test3.php");
- $bla = 3;
- print(json_encode($bla));
- ?>
File test3.php is empty.
Everything is working fine without the line include("test3.php"); With including the file the callback function function(data){alert(data); } does not execute. The problem disappears when i'm not using json.
Does anybody know where is the mistake?
Thank you for help and I'm sorry if there are some faults in my english.