Negative Space: PHP
- Add nodes to SimpleXMLElement
- If you want to add child nodes in PHP’s SimpleXML, the correct way to do it is to add the node first, then create it.
- Adding PDO_MYSQL to Mac OS X Leopard Server
- There’s “a feature request with engineering to include pdo_mysql” in Mac OS X Server. Fortunately, adding it is only moderately complex.
- Auto-closing HTML tags in comments
- One of the biggest problems on blogs is that comments often get stuck with unclosed italics, bold, or links. You can automatically close them by transforming the HTML snippet into an XML document.
- Form validation with in_array in PHP
- When validating form input, you often will use an array of valid responses. Watch out if some of those valid responses are integers!
- MySQL for other applications
- I’ve just uploaded a MySQL tutorial that focuses on using MySQL in programs such as Dreamweaver. It goes over importing data, viewing data, and updating data.
- MySQL for Other Applications
- The basics of working with MySQL for users of other applications such as Dreamweaver, PHP, Perl, or Python.
- New PHP Tutorial
- I’ve just uploaded a new version of my PHP tutorial, with a better MySQL section.
- Override the Host: header when using PHP’s readfile
- It is possible to specify HTTP headers when using URLs with PHP’s file-oriented functions such as readfile.
- Parsing JSKit/Echo XML using PHP
- In the comments, dpusa wants to import JSKit comments into WordPress, which uses PHP. Here’s how to parse them using PHP.
- PHP tutorial vastly improved
-
I’ve vastly improved my PHP tutorial, by moving from teaching a complex set of in-page code and functions to classes and a more template-based approach.
- PHP: Hot Pages
- Basic PHP to store form data and maintain sessions.
- Selling Django to the Eskimos
- How do you sell Django—and by extension Python—to clients whose programmers aren’t familiar with it?
- Stable sorting of numerically indexed arrays in PHP
- From PHP 4.1, sorted arrays are no longer “stable”. That is, if they are resorted and two items are equal values, they no longer can be expected to maintain their order vis-a-vis each other.
- Upgrading a server to Mac OS X 10.6 Snow Leopard
- I recently upgraded a Leopard Xserve to Snow Leopard; the installation went very well, but there are a few glitches—some of which will erase your data. Backup, backup, backup!
- Web display of Taskpaper file
- It is easy to use PHP to convert a Taskpaper task file into simple HTML conducive to styling via CSS.
- Webmaster in a Nutshell
-
Without doubt the best reference work for webmasters that you’ll find. It contains the “reference” part of most of O’Reilly’s web-relevant nutshell books. You can find references for HTML 3.2, the CGI standard, JavaScript, Cascading Style Sheets, PHP, the HTTP 1.1 protocol, and configuration statements and server-side includes for the Apache/NCSA webservers.
More Information
- readfile
-
“Reads a file and writes it to the output buffer.”
- What is new in PHP 5.3 - part 3: mysqlnd
-
“The overview of the advantages of mysqlnd over libmysql: high integration with the Zend Engine, faster execution, lower memory footprint, performance statistics for bottle-neck analysis, easier compilation, own development life cycle, usage of PHP stream API, client side query cache and a lot of possibility for future features.”
- eAccelerator
-
“eAccelerator is a free open-source PHP accelerator, optimizer, and dynamic content cache. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times.”
- SimpleXML
-
“The SimpleXML extension provides a very simple and easily usable toolset to convert XML to an object that can be processed with normal property selectors and array iterators.”