HOW TO WRITE PHP SCRIPTS (Disney web site) than a decimal
HOW TO WRITE PHP SCRIPTS than a decimal point. PHP will choke if you feed it numbers that contain commas (or any thing else) as the thousands separator. Understanding PHP error messages There s one final thing you need to know about before savoring the delights of PHP: error messages. They re an unfortunate fact of life, but it helps a great deal if you understand what they re trying to tell you. The following illustration shows the structure of a typical error message. The first thing to realize about PHP error messages is that they report the line where PHP discovered a problem. Most newcomers quite naturally assume that s where they ve got to look for their mistake. Wrong . . . What PHP is telling you most of the time is that something unexpected has happened. In other words, the mistake lies before that point. The preceding error message means that PHP discovered an echo command where there shouldn t have been one. (Error messages always prefix PHP elements with T_, which stands for token. Just ignore it.) Instead of worrying what might be wrong with the echo command (probably nothing), start working backward, looking for anything that might be missing. Usually, it s a semicolon or closing quote on a previous line. There are four main categories of error, presented here in descending order of importance: Fatal error: Any XHTML output preceding the error will be displayed, but once the error is encountered as the name suggests everything else is killed stone dead. A fatal error is normally caused by referring to a nonexistent file or function. Parse error: This means there s a mistake in your code, such as mismatched quotes, or a missing semicolon or closing brace. Like a fatal error, it stops the script in its tracks and doesn t even allow any XHTML output to be displayed. Warning: This alerts you to a serious problem, such as a missing include file. (Include files are the subject of Chapter 4.) However, the error is not serious enough to prevent the rest of the script from being executed. Notice: This advises you about relatively minor issues, such as the use of deprecated code or a nondeclared variable. Although this type of error won t stop your page from displaying (and you can turn off the display of notices), you should always try to eliminate them. Any error is a threat to your output.
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.