Ok well letting us know which language you are writing is helpful. Is this a server-side language like PHP?
If it is a server-side language you are writing, and what the web server is sending back to you is the actual code and not the code output, then it is more than likely the web server is misconfigured. You see when you do a server side language like PHP, the web server takes a request for a page and hands it off to a PHP process. When that process executes the code, generates the output, it gives it back to Apache which then passes it on to you as the output.
However, if Apache can’t determine (or is otherwise told that the PHP code is not PHP code) it may assume the code itself is just text and so renders the text. It never passes it to any interpreter and so it just gives you text.
To confirm it, if any browser gives you back the code and not the output, you can rule out any browser issue. Sounds to me that your server is thinking your code is text instead of code and giving you back the file as a text output (it may appear to still be a .php file, but the content type associated with the file is something like
Perhaps check with your server. If you are hosting it, make sure that no sensitive info is being disclosed in your code (no database passwords anything) and then ask your host what is wrong.