PHP programming tutorials
Pear Fix for “Error: Unable to Unpack”
contributed by David Kirk on February 12, 2009 under PHP programmingRecently while trying to install some Pear packages, I received an odd “Error: Unable to Unpack” message. A search for this error message found a lot of complaining people and not a lot of answers. I finally figured out the cause and the fix for this common Pear problem.
PHP: Upload Files to the Server
contributed by William_Wilson on September 30, 2008 under PHP programmingWith PHP, it is simple to upload any file to your server.
PHP: Print the current year for copyright notices
contributed by qmchenry on March 8, 2008 under PHP programmingHardcoding the year in a copyright notice is an easy way to get a blog or other website started, just placing the starting and ending years next to the copyright symbol. We have the very best of intentions to change this number right after the big ball drops in Times Square each year. We’re also human and, all too often, I see websites with copyright notices that are years behind. If your website is PHP-powered, this quick bit of code will put the current year in your copyright notice and off of your mind.
Make Wordpress Stop Replacing Double Dash with Em-dash
contributed by johnnythawte on November 20, 2006 under PHP programmingWordpress by default replaces the double dash (–) with an em-dash character. If you are showing code or programming examples this will cause your visitors unnecessary confusion. This recipe shows the simple way to turn that behavior off.
PHP: Delete or expire a browser cookie
contributed by qmchenry on July 14, 2006 under PHP programmingCookies may be created with an expiration time. It may become necessary to expire a cookie before the expiration time such as when a user logs out of a cookie-based authentication web application. This recipe describes expiring a cookie.
PHP: Read a browser cookie value
contributed by qmchenry on under PHP programmingOnce your web application has set a cookie in a user’s browser, it is a simple matter to retrieve that value in subsequent page requests. This recipe describes reading a value from a cookie in PHP.
PHP: Set or create a simple browser cookie with setcookie
contributed by qmchenry on under PHP programmingWeb applications overcome the lack of session support in the HTTP protocol primarily through the use of cookies. Transparent to the user and simple for the web developer, cookies provide the foundation of keeping up with who a web user is, where they’ve been, and what they had for lunch. Well, who and where, anyway.
RECENT POPULAR RECIPES
- Solve PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried...
- Cannot modify header information - headers already sent
- Redirect to another web page using PHP
- PHP if statement syntax
- PHP: determine the directory path of the server root
- PHP: Delete or unlink a file on the server
- PHP: Rename or move a file on the server
- PHP: Delete or expire a browser cookie
- View our Top Tens
TECH-RECIPES BLOGS
- Symfony Propel 1.4: New Project Workflow
- quickie: video on adding 3G modem to a Thinkpad Tablet
- modding: adding 3G to my Lenovo Thinkpad Tablet
- quick look: Lenovo Thinkpad Tablet (Honeycomb) and Pen (pics)
- design: my geek lair
- How to Delete Your Twitter Account
- Flash Error May Slow Down OS X Lion
- Mass Effect: Cannot See Mouse Pointer






