I have problem accessing to a javascript file. Chrome console's displays : "Refused to execute script MIME type ('text/html') is not executable, and strict MIME type checking is enabled."
All was working fine on localhost, the problem appeared when I uploaded it to 000webhost.
The file I want to link is actually a php file that display a multidimensionnel javascript array.
I've tried to modify the type to application/script, but nothing changed.
Head of my index file :
<script type="text/javascript" src="SQLtoMultiArray.php"></script>
<script type="text/javascript" src="script/script.js"></script>
SQLtoMultiArray.php file (allows me to convert my database into a javascript multidimensional array)
var voitures = [ [1014, "Abarth", "500", "MondoMotors", "2009", "Rouge", "Série", "Italie", ], [1015, "AC", "Cobra", "Box Model", "1962", "Noire", "Série", "Etats-Unis", ], [1016, "Acmat", "Vlra", "Solido", "1982", "Jaune", "Pompier", "France", ], [1017, "Alfa Roméo", "Giuletta Sprint", "Solido", "1957", "Bleue", "Série", "Italie", ], [1018, "Alfa Roméo", "Giuletta Sprint", "Solido", "1959", "Blanche", "Série", "Italie", ], [1019, "Alfa Roméo", "OSI Scarabeo", "Dinky Toys", "1966", "Orange", "Série", "Italie", ], [1020, "Alfa Roméo", "1300 Coupé", "Solido", "1969", "Marron", "Série", "Italie", ], [1021, "Alfa Roméo", "155 V6 T1", "Minichamps", "1992", "Blanche", "Course", "Italie", ], [1022, "Alfa Roméo", "Nuvola", "Solido", "1996", "Bleue", "Concept", "Italie", ], ];
Thanks for your help !