WhileIf Blog

Programming, Computers and Stuff

Primary menu

Skip to primary content
Skip to secondary content
  • Home
  • WhatsMyIP
  • About

Tag Archives: code

PHP – Locking files with flock()

Posted on May 23, 2012 by admin — No Comments ↓

The key problem with file system operations is the precarious situation you are in if two scripts attempt to write to a file at the same time. The fopen() function, when called on a file, does not stop that same Continue reading →

Posted in PHP, Tips | Tagged code, linux, PHP, programming, unix | Leave a reply

PHP – Read files/content/file details from a .zip archive, without extracting them

Posted on March 24, 2012 by admin — No Comments ↓

The above code, gives an example of the methods to use for extracting the contents of files, or status and size of files, in a .zip archive.

Posted in Code, PHP, Tips | Tagged code, PHP, programming, zip | Leave a reply

PHP – Anonymous Functions and Closures (Part II)

Posted on March 22, 2012 by admin — No Comments ↓

Suppose the application should reduce the list of percentages to those that are equal to or greater than a user-specified value. For this we can use array_filter(). The array_filter() function accepts an input array and the name of a function, Continue reading →

Posted in Code, PHP, Tips | Tagged Anonymous, code, PHP, programming | Leave a reply

PHP – Anonymous Functions and Closures (Part I)

Posted on March 22, 2012 by admin — No Comments ↓

Anonymous functions are functions that are defined without being bound to a proper name. Typically, anonymous functions are used only a limited number of times and for a specific purpose; you could think of them as “throw-away” functions if you’d Continue reading →

Posted in Code, PHP, Tips | Tagged Anonymous, closures, code, PHP, programming | Leave a reply

PHP – Extracting a zip compressed archive into a folder

Posted on March 21, 2012 by admin — No Comments ↓

Below code sample is for extracting the contents of a .zip file into a folder given by ‘/test/’. Note that if the folder ‘test’ is not there, it is created. The method extractTo does the process of reading all files Continue reading →

Posted in PHP, Tips | Tagged code, PHP, programming, zip | Leave a reply

Post navigation

← Older posts

Popular Posts

  • REGEX - Banking numbers validation
  • Wordpress - Disable Search
  • Linux - Exporting Files From Git (similar to SVN export)
  • Wordpress - Create Your Own Popular Posts content in the sidebar

Poll

What's the best browser for Web Development?

View Results

Loading ... Loading ...

Search By Tags!

analytics Anonymous apache benchmark c++ closures code cpu css dom exceptions fedora firefox funny gimp htaccess htacess html images install javascript jpeg jquery kubuntu linux linux mint Maverick Meerkat memcached mkv mysql mysqli netbeans nfs OpenSSL Operating Systems PHP pop3 precise pangolin programmers programming quality quotes recursion Regular Expressions security server software stuff subtitles suse telnet tmpfs tools traits tweaks ubuntu ubuntu server unix Virtualbox vlc web2.0 web marketing work worpress yui zip

Blogroll

  • Android Developers Blog
  • Cats Who Code
  • Developer Blog
  • Planet MySql
  • Planet PHP
  • The Code Project
  • WordPress Planet
Copyright © 2013 WhileIf Blog . All Rights Reserved.
Powered by WordPress | Theme: Catch Box