If php code in file.html - it is avoided ; if you change name to file.php ; then the code is executed.
good tip to link files so you can run either (sliceImg.php - sliceImg.html); one reads directory other just reads json file ; will also check for modifications dates to see if need to update list or json file