It works with URLs file://but not http:// ? I smell the same origin policy .
Do you open a jQuery file in your browser through a URL file://and then try to extract it through http://? Because your protocol and host must match when you do Ajax.
Make sure that you open the file in your browser as http://localhost/index.phpwell as not file://localhost/index.php . Then you can get this file through http://localhost/test.php.