3 ms·
The HTTP server is serving source code because of the braindead system of HTTP routing that PHP encouraged (because it's "easy") whereby scripts are stored in t
by zarzavat 4y ago
The HTTP server is serving source code because of the braindead system of HTTP routing that PHP encouraged (because it's "easy") whereby scripts are stored in the root path amongst resources, and the file system is used for routing. In other languages the HTTP server doesn't even know where the source code is.
- sgjohnson 4y ago> scripts are stored in the root path amongst resources that has been a known and documented bad practice for _at least_ 10 years.
- seydor 4y agoFirst, thank you for hating PHP, i'd hate to see it ending up like javascript, especially when ppl misunderstand basic things like this. This 'braindead' system is how the web has been designed from the start. And that issue can easily be mitigated by having using an index.php that simply does require('../app/app.php'). Serving files as text really has nothing to do with PHP since PHP interpreter isnt even invoked at all.