Ya, I understand that haxe server cannot process PHP. So in my case, I had the test PHP file on the xampp server installed on my machine, running on a different port.
The problem occurs when I test on the localhost server. It’s not able to get data from anywhere, whether it’s PHP or any text file placed on localhost or any remote location. ( For example my remote location is : freelancesoftwareservices.com/data/my.php )
However, when I uploaded all the html-build files on my hosting server, it successfully loads data from both, the PHP as well as the text file.
Looks like the problem ( as restorer pointed out CORS ) is something similar to Flash’s sandbox violation errors. So, I think there is no way to test data loading on localhost. I will always need to upload it on the remote hosting server for testing.
Anyway, thanks for the help.