I am getting the error: "\index.html does not exist" when try to use index.php instead of index.html. Is that a documentation error or there is a way to fix that? At the same time the documentation on the manual page here: http://docs.unity3d.com/Manual/webgl-templates.html says: "Each template folder contains an index.html or index.php" I guess - I didn't check - the same may happen with WebPlayer templates. Possibly a hack solution to that could be to add some pre-build editor script to rename .php to .html with a post-build function to rename it back, but I am hoping for some other answer.
Note: first is upload your file to the same directory as the index.php then inside the php, you could put this. Also make sure that you extract all the files from the Release folder excluding the UnityLoader.js. <?php include dirname(__FILE__).'/index.html'; Note: index.html is the html file of your unity game/app. ?> Hope this helps, if you want tutorials like, maybe you could visit me at bytescrafter.weebly.com
But the issue is - if you have both index.html and index.php files inside the directory, the system priority is .html and it would use .html. I guess possibly you should add a .htaccess file into the directory, containing the directive Code (CSharp): DirectoryIndex index.php index.html in order to change that. But anyway you just can't include .html file into php without additional steps like explained here: http://stackoverflow.com/questions/11887429/php-include-for-html BTW. why dirname(__FILE__).'/index.html'; not just 'index.html'?
I have just checked the most recent version, 5.6 . It is no problem now. Unity now accepts both file types and I have managed to use php file as webgl template.