开发者

How to load a json file

开发者 https://www.devze.com 2023-04-03 07:43 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号