FileToVar - Forum

Forum Navigation
You need to log in to create posts and topics.

FileToVar

Excuse me, but I'm starting to study VisualNeoWeb.
As shown in the image, I would simply read the value in a file on a web page.
I thought the right syntax was
FileToVar "http://www.naglieri.it/numero.txt" [pippo]
Why if I run this simple example the variable [pippo] doesn't get the numeric value present in the file?
Where am I wrong?

Uploaded files:
  • You need to login to have access to uploads.

Hi @naglieri

It's a CORS problem  https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

take a look here https://visualneo.com/forum/topic/loading-content-from-external-site-avoiding-cors

 

I'm sorry that such a simple problem ( reading data from a file ) needs such a complicated solution.
anyway thanks

Thanks again.
I'm not very knowledgeable about VNW.
If anyone is interested, I solved it using this service

https://codetabs.com/cors-proxy/cors-proxy.html

using syntax https://api.codetabs.com/v1/proxy?quest=<url_to_http_resource>

It works

Gaev and roccocogliano have reacted to this post.
Gaevroccocogliano

@naglieri please take a look at this video:

How to load and save content on server - YouTube

Regards.

If we have several files (like pictures) inside a folder and we want to store or load all the files by the user, how to do because the files cannot be defined in config.php  ?

If we have several files (like pictures) inside a folder and we want to store or load all the files by the user, how to do because the files cannot be defined in config.php ?

@phil78 you will need a custom PHP script or plugin.