Working with PHP Files and Directories

File Access and EOF PHP offers a number of functions for handling and working with resources. This articles discusses functions dedicated to file manipulation in PHP. What is a resource? A resource is simply an entity from which an input or output stream can be initiated. A stream in computing refers to a sequence of data elements made available over time. In PHP, this is simply a variable which holds reference to an external entity like a file. Note however that not all resources are necessarily files. For example, a network socket is considered a resource. The terms resource handling

more

Useful PHP String Functions

PHP has a rather large number of string functions. (They are pretty boring on their own — the fun always comes when you’re already in deep coding trance). On my local machine alone, Adobe DreamWeaver CS5’s O’REILLY PHP Pocket Reference lists around 80 string functions. These are already exhausting to memorize. I probably won’t use all of them in a PSD to WordPress conversion project but it is nice to know what tools I have at my disposal. I’ve covered a small fraction of PHP’s commonly used string manipulation functions in this article.  Topics about regular expression functions or alternatives

more

Convert HTML to WordPress

In its most basic sense, static pages are nothing more than HTML documents uploaded on a server and viewed on some random browser. The file uploaded on the server is the same document sent to the requesting client. If one compares source code of these files. There is no difference or change and thus the word “static“. These pages are “what the rest of the world calls web pages.” Much of what we call as static is hand-coded HTML. While it is quite rare now to find new sites being composed of purely hand-coded static web pages (content included), we

more

Writing more with Less.js Part I

First time I heard about embedding logic on my style sheet, I was thrilled. Imagine being able to include control structures on top of CSS or select child elements simply by nesting them in a similar way to your markup. This isn’t something that I get to use in PSD to HTML conversion projects, nonetheless it’s cool to have it under our belt. Less.js (“LESS”) is an extension of CSS created by Alexis Sellier. It works by adding dynamic behavior to the style sheet language. With LESS you can declare variables, make arithmetic computations, construct functions, make classes (called “mixins”)

more
BACK TO TOP