Hi Forum members,
Maybe a question that is more Linux than Yun but I am running a index.php file from the /www/ folder (Full path /www/index.php)
In this index.php file I am using a javascript GET-request that looks like this:
function getData0() {
$.ajax({
type: "GET",
url: "data.php",
dataType: "JSON",
cahce: "false",
success: function(data){
hv = data[0].hv;
hl = data[0].hl;
}
});
}
This works just fine when 'data.php' is in the /www/ folder. However, this also means that everyone can just serve to webaddressofmyyun.com/data.php. So I wanted this file to be somewhere else and decided it must sit on the SD-card as it has the most space available. The path to data.php is now '/overlay/mnt/sda1/data.php'.
However, if I process this in my GET-request under the "url", this does not work. It thinks that it should look in '/www/overlay/mnt/sda1'. How can I get it to direct to the correct path.
Thanks for thinking with me!