I have a js script that uses ajax to post data to a php script. The php script will open a text file and write the data that's passed from the js script. The same script works on chrome on a different machine but after I migrate it to the server where only IE is available, it does not work.
After executing the POST script in js, my browser shows the success
message but the data in the text file is not changed. One problem I can think of is the directory I put in my php script is not correct. So I added these lines from w3schools to see if the file is actually found, but nothing peculiar happened:
if(!file_exists("welcome.txt")) {
die("File not found");
} else {
$file=fopen("welcome.txt","r");
}
What are some other ways I can do for debugging in this case?
UPDATE
I think my php in general is not working for some reasons. I have replaced everything in my php file with
echo '<script type="text/javascript">alert("hello"); </script>';
I am assuming when I click the button on my webpage, the js will do a $ajax post and the php script will be executed showing the alert message. However nothing yet shows up
Aucun commentaire:
Enregistrer un commentaire