- Shopping Bag ( 0 items )
Essential skills for first-time programmers! PHP 4: A Beginner's Guide explains the ...
Ships from: Chatham, NJ
Usually ships in 1-2 business days
Ships from: acton, MA
Usually ships in 1-2 business days
If you use UNIX or Linux, you can create PHP scripts by using a program such as vi, emacs, or pico. It really doesn't matter what program you choose, so long as the program can create ASCII text files.
To begin writing a PHP program, launch your preferred text editor and type the following two lines into the editor's workspace:
Question: When I write C programs, I use an interactive development environment (IDE), such as Microsoft Visual C++, which provides a host of special features that make it easier to design, code, and test my programs. Are there any IDEs for PHP?
Answer: Some text editors, such as vi, provide special support for writing PHP programs. For example, vi's syntax coloring feature renders various PHP program elements in different colors. Many PHP programmers find that syntax coloring makes it easier for them to spot errors in their programs.
Some HTML editors, such as Allaire's HomeSite, provide syntax coloring and other features that aid PHP programmers, such as on-line manuals and expression builders. However, when you're first learning to write PHP programs, you'll probably find it easier to use an ordinary text editor than an editor equipped with special PHP features. Otherwise, you may spend much of your time learning to use the tool rather than learning to write PHP programs. Once you become more proficient in writing PHP programs, you should investigate tools that may help you work better. At that point, check out the PHP Editors list, available on the Web at http://www.itworks.demon.co.uk/phpeditors.htm.
Then, save your basic script as a text file having a name that satisfies the following rules:
stock-levels.php. Long after you create that file, you won't have a problem figuring out what the script does.
Question: These file-naming rules seem quite restrictive. Can't I .: use other characters in naming files that contain PHP scripts?
Answer: Yes, you can. But, using other characters is likely to get you into trouble. For example, Microsoft Windows filenames are case insensitive whereas UNIX file names are case sensitive. And, most operating systems prescribe file naming rules that differ from the rules that Web addresses (URLs) must obey. You can avoid the problems that arise because of such differences by using only lowercase letters, digits, and dashes in your PHP script file names.
|1||Creating PHP Programs||3|
|2||PHP Building Blocks||19|
|3||Creating HTML Forms||37|
|5||Working with Scalar Values||79|
|6||Writing Conditional Statements||99|
|11||Working with Files and Directories||211|
|12||Sending and Receiving E-mail||261|
|13||Relational Database and SQL Primer||293|
|14||Accessing Relational Databases||339|
|15||Using Classes and Objects||381|
|16||Using Application Templates||403|
|17||Debugging PHP Scripts||417|
|App. A: Answers to Mastery Checks||441|
|App. B||Installing PHP||457|
|App. C||PHP Resources||465|
|App. D||Unix Essentials||469|
|App. E: Escapes||493|
|App. G||PHP Operators||501|
|App. H: Security||505|
|App. I||PHP Functions||511|
Posted November 7, 2002
Having prior HTML knowledge, taken a C++ class in college (UGH... WHAT A COMPLETE WASTE OF MONEY!!!!) and debugging (not actually building functional enterprize code) Java and TCL at work, i found this book to be excelent. Examples are clear, and well explained, online source code is available (which is a plus). Only draw back, it left me hungry for more. Off to buy another book, more advanced this time.Was this review helpful? Yes NoThank you for your feedback. Report this reviewThank you, this review has been flagged.
Posted December 1, 2008
No text was provided for this review.