News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DZone.com:
Using a stream wrapper to access CouchDb attachments with PHP
April 28, 2011 @ 10:45:27

On DZone.com today there's a new post from Gonzalo Ayuso about using a stream wrapper to access CouchDb database directly from PHP (via a call to its local file).

Thanks to a comment in my last post (many thanks Benjamin) I've discovered that it's possible to create a stream wrapper in PHP (I thought it was only available with a C extension). It's pretty straightforward to create the wrapper. Of course it's only an approach. We can create more functionality to our stram wrapper but at least this example meets my needs.

His wrapper uses a client from his Nov framework to open the stream to the given path and gives read and write methods to work with the data inside the database. Code for the wrapper class is included as well as a bit of example code showing how it can be used with the custom stream protocol. You can find the complete code here.

0 comments voice your opinion now!
couchdb stream wrapper database tutorial


blog comments powered by Disqus

Similar Posts

The Bakery: 10 New CakePHP Articles, Tutorials and Helpers

Profeshunl Newbie Blog: MongoDB as in huMONGOus, not retarded

Version Control Blog: Upgrading Drupal with Git

ParanoidFerret.com: Using Flex, PHP, and JSON to Modify a MySQL Database

PHP-GTK Community Site: GtkToolbar, GtkMenubar, and PEAR XML-RPC for geo-nick


Community Events





Don't see your event here?
Let us know!


symfony bugfix laravel release community list introduction framework language voicesoftheelephpant series interview developer deployment podcast tips conference library api zendserver

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework