Archive for June 23rd, 2006
PHP Developer - June 23rd, 2006
PHP Magazine has posted their latest weekly roundup of all of the happenings for the week of June 18th, 2006. The list this time includes:
- Is there a lack of innovation in the Zend Framework?
- Making a choice of framework
- Comparing frameworks - PHP4 versus PHP5
- IBM and Oracle’s announed effort towards integrating PHP into the SOA
- the release of phpBB 3.0 Beta 1
- the PEAR, PECL, and PHPClasses releases for the week
Be sure to check out this post for the full details on these and other happenings this week.
Continue Reading ·
PHP Developer - June 23rd, 2006
On the ZD Net Asia site today, there’s a quick look at using the FTP functionality that can be compiled into PHP to create a method to upload files.
Take file upload, for example. Sure, you can do it the traditional way, using HTTP file upload and transferring the file directly to a location on your Web server’s disk. Or you can do it the more exotic way, and use the FTP protocol to upload in a two-step process: from your local disk to a Web server, and then to an FTP server.
Reams have already been written about HTTP file upload, which is why this brief tutorial focuses on FTP-based file uploads instead (in the example that follows, though, you’ll see both in action). Note that this tutorial assumes that you have a working PHP/Apache installation, with both HTTP file upload and FTP functions active.
They have three steps for you to take to get their example up and working:
- checking that you have the access rights to get on the server
- creating an upload form
- code the PHP upload processor
The form and PHP code are provided, so there’s no reason to worry on that count. The biggest issue is whether or not you have the FTP support compiled into your PHP installation. From there, it’s just a few simple function calls away from pushing the uploaded files contents out to a remote server.
Continue Reading ·
PHP Developer - June 23rd, 2006
On php|architect’s A/R/T article repository today, there’s the next in a continuing series Scott Mattocks is doing on PHP-GTK 2. This time, he looks at how to manage the layout of your application with the given functionality.
In the last article, “Hello PHP-GTK”, we looked at what it takes to create a simple application. At the end, we were left with a PHP-GTK implementation of “Hello World”. The application was very simple. Too simple. All it did was display one line of text in a window. In this article we will expand on the previous article by adding more content to the window. Along the way we will look at how parents and children interact and what it takes to make children behave properly.
He starts by explaining the parent child relationship between the base window and other children (spawned) windows, mentioning the GtkWindow and GtkObject widgets. With windows down, he moves on to “boxes”, seperation areas inside the windows to help organize the content (including ways to frame them in). And, to wrap it all up, a look at GtkTable, a widget that helps you create a nicely laid out table inside of your window (simpler than several boxes).
Continue Reading ·
PHP Developer - June 23rd, 2006
On the Cake Baker blog today, Daniel Hofstetter has posted a (very) quick look at how you can use the modules from the popular Zend Framework from inside of CakePHP.
I am sure you already heard about the Zend framework. It provides some nice components (don’t confuse them with Cake components) for which there are no equivalents in the core of CakePHP. Due to the flexibility of CakePHP it is relatively easy to use these Zend components within a CakePHP application (be aware that the Zend Framework requires PHP5).
In five easy steps she shows how to grab the files you’ll need, where to place them, how to make a simple wrapper around them, and make it usable by the CakePHP framework. Easy as that - CakePHP has the built-in capability to support modules other than their own. All it takes is the right wrapper settings.
Continue Reading ·
PHP Developer - June 23rd, 2006
In this new tutorial from Builder.com today, they take file searing (on the local machine) to the next level and illustrate the use of the PEAR File_Find package.
[But] recursive functions are complex, messy things and most developers (including myself) don’t really enjoy working with them. That’s why, when my last project needed to scan a directory hierarchy for a particular file (a typical recursive-function task), I didn’t even consider rolling my own code. Instead, I headed straight for PEAR and its File_Find class, which takes all the pain out of searching multi-level directory structures.
You’ll need to have worked with PEAR before, as there’s no installation instructions, but pulling it in and getting it working from there is a breeze. They include the code examples that you’ll need to follow along, showing how to create the object, what the object’s “tree” of files looks like (recursively too!), and how to send the object off searching for a particular file as defined with a perl-compatible regular expression.
Continue Reading ·