I have created my web application with the Web AppBuilder Developer edition, downloaded the zip file and customized the index.html file in my localhost environment. Everything works fine until I change the name to index.php. I am doing this because I have some custom php code that I want to include in the file. I can name it index2.html but *.php seems to not work. Can I do this? and if so, how?
I posted this question here as well with no interest so far.
-
1If nothing helps, if I remember right, it should be possible to add <php> tag into the html file and to refer to php from html - stackoverflow.com/questions/11312316/…. Maybe an option for you?Alex Tereshenkov– Alex Tereshenkov2015年08月31日 18:49:57 +00:00Commented Aug 31, 2015 at 18:49
1 Answer 1
Over at GeoNet, Junshan Liu pointed out the following.
This is caused by getPath function in env.js. In this function there is path check
/\.html$/.test
I found that on line 162 in env.js and changed it to ...
} else if (/\.php$/.test(fullPath.split('/').pop()) || /\.html$/.test(fullPath.split('/').pop())) {
And that now allows me to load either version (html or php). It also looks like editing "client\stemapp\env.js" might cause this to roll out every time (I haven't tested this yet)?
Explore related questions
See similar questions with these tags.