Tuesday, August 18, 2009

Week4 Practical

We got a php exercise today which asked us to change the format to show the date. After viewing the date commends on http://php.net/date. I actually did it. The most tricky thing I think in this practice is that how to show the word "of" because the letter "o" is a command in date function. I solved the problem by adding a backslash before the letter "o" in order to use its literal meaning after using google to find the solution. Below is my whole php script:



Furthermore, I also paid attention on the php mechanism. When I checked the code of the page which server posted back to me. It shows like this:



Just like Alatair said, the PHP server will automatically interpret the php code and send back a page with normal HTML code. Amazing!

I really learned a lot from this lecture and found php is quite an interesting language. However I still got a question. Could anyone tell me which php command shows what sort of database system is provided by uni host?

No comments:

Post a Comment