0

I just wrote two php files to learn how ajax works. but chrome reported such error:

XMLHttpRequest cannot load file:///E:/myFolder to Ajax/AjaxUserCheck/AjaxUserCheckegisterProcess.php?username=fs. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.

I saw suggestions to add flag

--allow-file-access-from-files

in chrome, but I still failed after using this. Do anyone know how to solve this? thanks in advance.

LeonloveKaren
  • 311
  • 3
  • 14
  • why are you trying to access something by drive letter? It may help with rapid prototyping, but I'd suggest having something like apache setup locally. I can only suggest https://www.apachefriends.org/ – Scuzzy Sep 08 '17 at 01:34
  • I found what you are referring to at https://stackoverflow.com/questions/18586921/how-to-launch-html-using-chrome-at-allow-file-access-from-files-mode This doesn't' look ideal at all. – Scuzzy Sep 08 '17 at 01:35

0 Answers0