Advanced Topics

I l @ ve RuBoard

While this book should adequately get you started using PHP there are still a few topics that you may want to investigate further.

The first such subject is creating objects and classes using PHP. As you improve upon your programming skills, and especially as you build a strong code library, being able to create and utilize objects can improve your programming speed and minimize runtime errors. Also, learning about objects using PHP can facilitate later acquisition of other programming languages which are object-oriented such as Java (despite the existence of objects within PHP, it is not an object- oriented language). You can find several good tutorials online regarding objects in PHP, including one at Zend.com, http://www.zend.com/zend/tut/class-intro.php (Figure C.5).

Figure C.5. The Zend.com tutorial on object-oriented programming in PHP is thorough and fairly easy to understand.

graphics/cfig05.gif

Two other subjects that I would recommend you investigate ”using functions to return multiple values and variable variables ”are discussed in the PHP manual. The former is demonstrated in the Functions section, explaining how you can use an array to return several values from within one function. The later can be found within the Variables area of the manual and shows how you can create, assign a value to, and retrieve a value from, variables on the fly. It's a complicated subject to understand and use but it can help take your programming to a much more sophisticated level.

The topic of file permissions was briefly discussed in Chapter 10, Files and Directories. If you are using a Unix server and desire to know more, look to either the Unix manual (found with the man command) or to Elizabeth Castro's excellent book PERL and CGI for the World Wide Web: Visual QuickStart Guide. In her appendices, she covers permissions as well as security and some basic Unix information. Those of you using Windows servers can learn more about file permissions through Microsoft's Web site (http://www.microsoft.com) or the Windows Help files.

Finally, through the course of this book I recommended that you can expand your use of regular expressions and other PHP features by using existing codes. Check any of the Web sites listed earlier in this chapter for sample code which you can paste into your programming. Other programmers have already developed patterns for matching regular expressions and advanced scripts that allow you to do things such as send attachments in an email using PHP. Either outright using their work or merely building upon it can both save you time and teach you different ways of achieving your goals.

I l @ ve RuBoard


PHP for the World Wide Web (Visual QuickStart Guide)
PHP for the World Wide Web (Visual QuickStart Guide)
ISBN: 0201727870
EAN: 2147483647
Year: 2001
Pages: 116
Authors: Larry Ullman

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net