News Feed
Jobs Feed
Sections




News Archive
feed this:

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

Lorna Mitchell:
What Goes in Source Control?
April 30, 2013 @ 10:31:26

As developers, one of the best things you can do for a project is to use version control (or "source control") for your code. Lorna Mitchell suggest using it on a wider scale, though. She sees it as a great place for all sorts of other things around a project too.

Short answer: everything! However we need some good directory structures and source control configuration to make that a really practical answer, so this article is a quick outline of my usual advice for a good source control structure for a standard web project. The examples are for a PHP project but I'm sure you could apply this to your own language of choice, also.

These "other things" she suggests that should end up in source control including things like:

  • The actual "web root" of your application
  • Library code
  • Build scripts
  • Configuration files
  • Database patches
  • Tests (unit, functional, integration, etc)
0 comments voice your opinion now!
source version control suggestion contents

Link: http://www.lornajane.net/posts/2013/what-goes-in-source-control

Robert Basic's Blog:
Zend Framework full page cache tips
February 13, 2012 @ 11:45:10

If you're looking at using the full-page caching that the Zend Framework has to offer, you should read about Robert Basic's experiences with it before implementing it in your application.

When I started rewriting this blog, I knew from start that I want to use Zend Framework's full page caching, as, I think, that's the best cache for this purpose. Not much going on on the front end, much more reads than writes, no ajax or any other "dynamic" content. While implementing the cache, I ran into two issues.

His issues revolved around the feature not creating valid cache files due to a duplicate "startSession" call in his code and having the Google Analytics code included in the template (with different keys every time). You can find out more about this functionality in the Zend Framework manual.

0 comments voice your opinion now!
zednframework fullpagecache problem page contents


Christian Stocker's Blog:
Upload Progress Meter extension 0.9.2 released
January 22, 2009 @ 09:36:38

Christian Stocker has released the latest version of the uploadprogress extension to the PECL repository (0.9.2). The package allows the code to track the progress of an upload automatically.

The main new function since 0.9.1 is uploadprogress_get_contents($id), which allows you to analyse the content of an uploading file during the upload and do appropriate measure (for example warn the user, that he doesn't upload a supported video format). You have to enable this feature in php.ini to make it work. This feature was provided by Ben Ramsey, so you have to poke him, if something's wrong with it.

A simple example of it in action is also included (in the /examples subdirectory off of the PECL page) showing how to upload a file, get the progress and - most importantly - how to get useful error messages out of it.

0 comments voice your opinion now!
upload progress pecl extension example contents analyze


Cory Borrow's Blog:
Creating thumbs from textfiles with PHP and GD
January 16, 2008 @ 12:50:00

Cory Borrow has posted a tutorial he's created to show how to harness the power of PHP and GD to create thumbnail images out of the contents of a text file.

Today, I'll give a little info on how to achieve the process of creating a thumbnail using PHP, GD and the text from a text file. It is really pretty simple, so lets get started.

The trick behind the translation is in reading in the contents of the (plain) text file and pushing it into a string value of a newly created GD-generated image. He includes the code to make using it in your own app simple (a cut and paste version) - his method FileToThumb.

0 comments voice your opinion now!
thumbnail image gd tutorial text file contents thumbnail image gd tutorial text file contents


Wez Furlong's Blog:
HTTP POST from PHP, without cURL
November 15, 2006 @ 10:09:00

In an effort to get streams more out in the, er, mainstream, Wez Furlong has posted an example of some code for a common operation many use cURL for - posting to a remote script - but with streams.

Every time I search for the code snippet that allows you to do an HTTP POST request, I don't find it in the manual and resort to reading the source. So, here's an example of how to send a POST request with straight up PHP, no cURL.

The example uses stream_context_create, fopen, stream_get_contents and an Exception to send off the message from an inputted array to the remote server. Smaller things, like the Content-length header on the request, are automatically handled by the wrapper functionality. You can check out this page for more information on the wrapper functionality.

2 comments voice your opinion now!
http post without curl stream context contents exception http post without curl stream context contents exception


Zend Developer Zone:
Davey Shafik and Ben Ramsey on the Zend Certification Exam Study Guide
October 09, 2006 @ 14:56:00

On the Zend Developer Zone today, there's an interview with the co-authors of the recently released book from php|architect, the Zend Certification Study Guide.

The new Zend Certification Study Guide is out and the initial reviews look good. Since this was a topic of interest to me (mainly because I've yet to take the test) I decided to dig a little deeper. I fired up my recorder and called Davey Shafik and Ben Ramsey, the authors of the new guide, to talk to them. Here to give you a little of the back story is our conversation.

They talk about:

  • the release of the book
  • some of the contents of the chapters (including the sample chapter on security)
  • Davey's experience with the exam/Ben's use of his PHP4 certification in his work
  • and the practice tests that php|architect is offering to get developers prepared.

0 comments voice your opinion now!
interview zend certification php5 study guide author contents experience interview zend certification php5 study guide author contents experience


SitePoint PHP Blog:
The Joy of Regular Expressions [1]
September 26, 2006 @ 08:02:45

Sometimes, it's just not enough to sit and try to teach theory about something in programming - it's better to just jump right in and take things as they come. That's what Harry Fuecks thinks, at least in his latest post on the SitePoint PHP Blog - a look at the "Joy of Regular Expressions".

He does go over a bit of the theory and why they are so invaluable, but it's a short section before he gets to the heart of the article - working with regular expressions for:

  • positive matching
  • matching all instances in a given string
  • finding an exact match
  • matching the start of a string
  • validation of the contents of a string
  • checking the length of a string
There's simple examples included for each of the items to help you get an idea of how they'd work.

1 comment voice your opinion now!
regular expression tutorial theory matching length contents regular expression tutorial theory matching length contents



Community Events











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


introduction project hhvm security hack example application unittest facebook database install language component release symfony2 podcast package framework composer performance

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