3

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.

asked Aug 31, 2015 at 17:54
1
  • 1
    If 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? Commented Aug 31, 2015 at 18:49

1 Answer 1

2

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)?

answered Sep 1, 2015 at 12:53

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.