DevShed: Uploading Files and Navigating Directories in PHP
110447
Continuing on in their latest series (begun with this part), DevShed has posted part two of their look at working with files in PHP - "Uploading Files and Navigating Directories in PHP".   They jump right in, giving you the needed settings for your php.ini file to get the examples to work (mainly for the file uploads). They explain what a file upload form looks like and what some of the potential error codes could be.   The code comes next, showing a simple file upload form taking in the file, moving it off to another directory, and if there are errors, displaying them. The next obvious step up from a single file upload is the multiple file upload, and they show how to use PHP's form handling of arrays to accomplish this.    Finally, they include a simple little script to read the directory the files are in and display the information about them (like size file, name, and modified date).
754440
From the Inside Open Source APress blog, there's a new post by Michael Stahnke documenting his search for a useful way to work with configuration files in a PHP application.   Recently I was working on developing an application that required a configuration file to setup. [...] XML is too hard to read for management-types. Plain text wasn't all that easy to handle from a code perspective. Then I remembered that when I played with Ruby on Rails it used something called YAML, and thought I'd give that go.   Searching around, he discovered the spyc library that aids in the YAML development and, as suggested by a commentor, the standards-compliant extension syck.
635920
Popular posts from PHPDeveloper.org for the past week:Padraic Brady's Blog: Complex Views w/Zend Framework - The Final Chapter: ZFE & Zend_Layout in Core!php|architect: Stuff your stockings: single issues 30% offDeveloperTutorials.com: How to Install PHP 5 on LinuxStoyan Stefanov's Blog: Fancy FormattingSymbianOne.com: Your S60 Web server gets a boostAndreas Gohr's Blog: MySimple.php - A lightweight PHPMyAdmin substituteNessa's Blog: Working with Permissions in PHPSymfony Blog: Symfony 1.0.10 is OutMatthew Turland's Blog: Web Scraping Article PublishedJan Lehnardt's Blog: REST Controller for PHP Applications
602334
DevShed continues their look at the DirectoryItertaor class in PHP 5 with part three posted today, a look at using the introspective methods to find out information about things like if a file can be read or not and what its permissions are.   This class still has some additional methods that require special attention. For this reason, this last tutorial of the series will be focused mostly on covering all the methods related to performing some kind of introspective process, which can be quite useful when analyzing the types and permissions of each entry included in a given directory.   They go through the functionality, pointing out the functions to check:  if an entry is a directory or not if an entry is a "dot" or not ("." or ":") if the entry can be executed/read/written to to grab the permissions and the type of the entry  And, of course, there is code to go with each example, making it easy to pick out the parts you'd find useful and include them in your own code.
396236
This month's issue of php|architect has been released and includes articles such as:  PHP5: Beyond the Objects The Ultimate PHP 5 Shopping Cart PHP and Databases Error Handling with PHP 5 and PEAR
383203
In this new article from PHPBuilder.com today, they walk you through the creation of an online photo gallery system, complete with all of the (simple) features you'd expect.    You've seen them all over the web--image galleries for your viewing pleasure! You've looked for decent image gallery software, but none of them seem to suit your needs, while others have a lot of extra features you don't need. And while you've seen some others that are just what you're looking for, you can't easily integrate them into your website. To solve this problem, I wrote my own photo gallery script and I'm going to share it with you in this article.    They start off with an overview of how the script/site will be set up, and quickly move into the HTML for the pages (the "easy part"). Once they have that and some CSS out of the way, they show some of the PHP code that will get you started. Of course, this is only part one, so you'll have to come back for the rest of the story...
187716
This month's edition of PHP Magazine has been released!
552896
DevShed has posted the next part of their series looking at handling errors thrown by the __autoload functionality of PHP. This time they enhance their previous method and allow for custom error messaging.   In this last article of the series I'm going to introduce some additional modifications to the current signature of the "__autoload()" function to make it throw exceptions that display more useful error messages.   They start by setting up the application to have something to build from (a series of PHP scripts). They add on the exception handling to throw the custom error (the "class not found" they mentioned).
642360
DevShed has started a new series looking at working with PHP and databases with this new tutorial posted today, an excerpt from the O'Reilly book "Programming PHP, Second Edition".   We focus on the PEAR DB system, which lets you use the same functions to access any database, rather than on the myriad database-specific extensions. In this chapter, you'll learn how to fetch data from the database, how to store data in the database, and how to handle errors. We finish with a sample application that shows how to put various database techniques into action.   In this first part of the series, they look at what kinds of things are possible with the database connection, some of the basics of using the PEAR DB class and working with data source names to help with the connection.
464596
PHP isn't exclusively for Web pages. You can use it like Perl for cron jobs and other tasks.
277396
Lukas Smith has posted his review of a book from Packt Publishing - "PHP Web 2.0 Mashup Projects: Practical PHP Mashups with Google Maps, Flickr, Amazon, YouTube, MSN Search, Yahoo!"   Duane from Pakt asked me if I would be interested in reviewing a few books for them in my blog. I picked "Mashup Projects" from the list of just released books, since I am interesting in the topic and I am actually going to give a presentation at the internal "PHP Day" we are doing at Optaros in November.   He points out the good (good writing style, well-chosen examples) and the bad (a log list of errors and oversights in the code). He also talks about the contents of the book - the different examples and the final more major project. Overall though, he sees it as a good book, one that would be a good introduction to mashups for PHP developers (if you look past the formatting issues).
575210
Popular posts from PHPDeveloper.org for the past week:PHP-Coding-Practices.com: How I Turned A Slow Array Sort Into A Quick One Using Quicksort AlgorithmZend Developer Zone: PHP Abstract Podcast Episode 4: Planning ProgrammingWeb Development Blog: Save bandwidth with PHProxy and ip2nationJob Posting: Assembleron Ltd Seeks PHP 5/MySQL/Ajax Developers (Reading, UK)PÃ¡draic Brady's Blog: Complex Views with the Zend Framework - Part 6: Setting The TerminologyThe Bakery: Four New Articles - Load Balancing, Request Info, UUID Behavior & Upload ThumbnailsCommunity News: PEAR Installer version 1.6.0 releasedChristopher Kunz's Blog: Building PHP with cURL and libmysqlclient5DevShed: Working with Prepared Queries with PDO Objects in PHP 5Secunia.com: rPath update for gd, php, php-mysql, and php-pgsql
632739
Continuing on from this previous post, DevShed has this new tutorial posted. Another excerpt from O'Reilly's "Programming PHP, Second Edition" (by Kevin Tatroe, Rasmus Lerdorf, and Peter MacIntyre), this section gets more into connecting to the database, making a query and returning some information.   They start off looking at the DSNs mentioned previously and include a bit of error checking around it to handle anything that might come up. The next step is, of course, to make a query against the information in your database. They also include an example of the fetchRow method to push the returned results into a variable.   The variable is built out as an array, so they show what that array looks like "on the inside" and how you can reference the different values that make it up.
726766
DevShed has posted the third part of their series looking at accessing the Yahoo! web services via PHP5 scripts. This time it's a focus on using the image search capabilities.   In this third chapter of the series, I'm going to continue exploring in detail other helpful web services offered by Yahoo!, such as those focusing on searching images and videos. Also, I will demonstrate how they can be queried directly from a basic PHP 5 application and process the corresponding search results by utilizing the same group of array handling functions that you saw in the previous article of the series.   Just like in previous articles of the series, they make a simple class that connect to the Yahoo! web services and request search details back about their queries (like "Madonna").
437494
Popular posts from PHPDeveloper.org for the past week:PHPClasses.org: A PHP killer feature - Streams abstractionRob Thompson's Blog: Switch vs. IfPHPEverywhere: Octopussy numbers in PHPJob Posting: MODE Visual Seeks PHP Developer (Charlotte, NC)ProDevTips.com: Why PHP as a templating language sucksMatthew Turland's Blog: The Yin and Yang of TypingStubbles Blog: Stubbles 0.5.0 releasedChristopher Jones' Blog: Updated connection pooling in PHP's OCI8 extensionBen Ramsey's Blog: Congrats Costa Rica PHP!Carsten Lucke's Blog: Configuration issues with Xdebug on Debian Etch
198996
Continuing on from the first part of the series looking at the use of Adapter objects, DevShed has posted part two today - using the Adapter objects along with Directory Iterators to integrate with a MySQL database.   Provided that you understand the basic concepts of the adapter pattern, in this final tutorial, I'll show you how to use it in conjunction with the "DirectoryIterator" class, bundled with PHP 5, and with a couple of MySQL wrappers as well.   They jump right in (as was said, assuming you read the previous article) to using the directory iterators and the adapters together to make a class that gets information about the files in a directory. They take this and show a sample use that's then transformed into a class capable of using the same logic on MySQL results.
144395
David has posted an article to the Expirmentalworks.net blog about a task that he and Johannes Schluter have finished up - importing the PHP CVS tree over into Git.   A few month ago Johannes Schluter and I started discussing about GIT and other decentralized version control systems. During our exploration of GIT we thought about importing the PHP CVS tree into git. A few weeks later and a lot of wasted cpu time, we finally managed to provide an inofficial GIT mirror of the PHP CVS repository. ItÃ¢ÂÂs provided by Johannes Schluter and mirrored by me.    The post documents the path they followed - using git-cvsimport, parsecvs and a path they needed to make - to finally get the import working without any flaws. You can check out their unofficial repository here (it's updates twice a day from the live CVS).