Q | You have covered an installation for Linux/Unix, Mac OS X, or Windows, and the Apache Web server. Does this mean that the material presented in this book will not apply to my server and operating system? |
A | No. One of PHP's great strengths is that it runs on multiple platforms. You can find installation instructions for different Web servers and configuration directives for database support in the PHP manual. Although the examples throughout this book are specifically geared toward the combination of PHP, MySQL, and Apache, only slight modifications would be needed to work with the examples using different Web servers or databases. |
Q | Which are the best start and end tags to use? |
A | It is largely a matter of preference. For the sake of portability, the standard tags (<?php ?>) are probably the safest bet. Short tags are enabled by default and have the virtue of brevity, but with the increasing popularity of XML, it is safest to avoid them. |
Q | What editors should I avoid when creating PHP code? |
A | Do not use word processors that format text for printing (such as Word, for example). Even if you save files created using this type of editor in plain text format, hidden characters are likely to creep into your code. |
Q | When should I comment my code? |
A | Once again, this is a matter of preference. Some short scripts will be self-explanatory, even after a long interval. For scripts of any length or complexity, you should comment your code. This often saves you time and frustration in the long run. |