How to load a json file
I have a json file on my server.
http://myserver/myfile.json
If I type the url into a browser I get a page not found error.
If I set the url of a http service to the path of the json file the httpservice wont load it.
Is it possible to load a json file in t开发者_运维技巧his way or does the json file have to be the result of a server page request eg: http://myserver/getjson.php
The problem is this:
If I type the URL into a browser I get a page not found error.
It sounds to me like you have a configuration issue on your web server.
There is no way a Flash App can load something from your server that the server itself cannot deliver.
There are two different ways to approach this. You may have to set a mimetype on the server so the file is recognized. Or you may have to define the 'json' extension as an allowable file.
How you go about doing either of those things depends on the web server.
精彩评论