Vinh, the reason you see code is that you don't have apache (or whatever server you are using) configured for php. It doesn't know that it's supposed to pass requests for php pages over to the PHP processor.
Alternatively, PHP itself is not properly installed. Try "php yourfile.php" at the command line: it should interpret any php code you have. A good test is to create a page with the php date function in it: see if you see the actual date on the command line. If you do, they you need to edit your httpd.conf files and add support for the mod_php modules.