News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

Richard Heyes' Blog:
Reading a specific line in a file
0 comments :: posted Monday April 07, 2008 @ 12:56:08
voice your opinion now!

Richard Heyes has thrown together some code for a simple thing that he's seen developers request over and over again - moving to/reading from a specific line in a file.

After reading something on the php-general list I decided that a) I'm bored, and b) I'll write something which handles it. So here it is.

His code is simple - looping through the lines of the file until it locates your desired target (with some error checking along the way). Plus, if it's already fetched, it keeps it in a cached array for future retrieval.

tagged with: reading specific file line example code class


PHPit.net:
PHP on the command line
0 comments :: posted Monday March 13, 2006 @ 07:26:42
voice your opinion now!
PHPit.net has posted another new tutorial, this time they look at the command-line, providing the basics to those that have only used PHP in the web-based world.

PHP is traditionally only used on the internet to power our websites, but it's also capable of doing more. Since version 4.3 PHP ships with a special version which can be used to execute scripts on the command line, and do certain system tasks. If you're a Linux user, you probably know what the command line is, but if you're a Windows user you might not.

They show the code/commands in the examples they give in the context of it running on a Windows machine, but it's not a far leap to work with it on a unix-based system as well. They start with the basics - how to get to it, how to use it - before moving on to other features, like taking in arguments. They wrap it up with a sample application, a calculator, that can do the four basic operations on the two numbers entered.

tagged with: php command line tutorial introduction beginner php command line tutorial introduction beginner


ajax pecl zendframework job database package mysql developer framework release book PEAR PHP5 zend application code cakephp security conference releases

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