loadStrings() run well on desktop but not in web server

edited October 2013 in JavaScript Mode

The code run well on desktop but not in web server

String lines[] = loadStrings("http: //220.241.239.201:8200/ftp/test4.php");  // Remove space after :
println(lines[0]);

At the begining, i think this is my server config problem, but i try to run in processingjs http://processingjs.org/tools/processing-helper.html the result also negative.

Is there any other method to connect mysql in processing js mode?

Answers

  • edited October 2013

    When I run your code snippet, it works for me, displays a line of comma-separated numbers.

    Then you mention processingjs, and you got me confused. Is it about the JavaScript mode? In case that's what you meant, I moved the topic in this category.

    It is confusing because even if the program reside on the Web server, it is run on a browser, not on the server!

    JavaScript programs cannot load data from a different server. If your JS script is located on the above server, it should be able to load the data, otherwise, you might need to use JsonP or similar trick.

Sign In or Register to comment.