Thursday, June 27, 2013

JavaScripts evil twin brother

JavaScript is the easy, friendly, robust client side scripting method for most people. It does however, have a twin brother which lurks in the dark shadows of server operation. Ever wonder how websites get those fancy, flashy animations and smooth design schemes? Well, that's probably PHP at work behind the scenes of the server that website is connected to. PHP is a scripting language that is compiled by the server into HTML for the browser to render. You cannot actually download PHP script files directly from the web page as that would be a huge security breach in the server itself. Instead, what you get is a messy, sloppy HTML page that the website is actually rendering. This sloppy HTML, albeit much better looking than anything MS Word could ever do, is not something that anyone in their right mind would ever actually write as an HTML project. You can, however, write PHP to generate this sloppy HTML and the actual PHP file looks much more appealing to the coder's eye. Of course, there are several tutorials for those daring to reach into the depths of scripting languages. Here is a tutorial for those willing to do exactly that.

May the force be with you.

2 comments:

  1. Thank you! I'm trying to learn PHP. My favorite function so far is the include "" function.

    ReplyDelete