Sunny Books
What we have

phpSunny Books

Integrating Smarty and CodeIgniter

Integrating Smarth template engine into CodeIgniter can completely separate the HTML/CSS presentation from PHP application logic while still takes advantage of MVC Model, View, and Controllers) of CodeIgniter.


Common used regular expressions

Regular expressions are cumbersome but powerful. Understanding regular expressions can improve efficiency and also give you the absolute sense of accomplishment.


Cloudant: a cloud database service

Cloudant is a non-relational, distributed database service that based on the apache CouchDB. Cloudant's service provides integrated data management, search, and analytics engine designed for web applications and requires zero-configuration.


CouchBD: a database for the Web

Apache CouchDB is one of a new breed of database management systems. It is a document-oriented, noSQL database.


PHP image upload

Some websites may need the functionality to allow users to upload images. By using the global PHP $_FILES array we can creat an image upload script to upload files from a client computer to the remote server.


PHP force download

When creating a website, we often need to provide users the functionality of file download. A force download script can give us more control over the download processing than a direct download link. For exmple, we can check user permissions, increment a c


HTML special characters

Sometimes we need to convert some special characters to HTML and vice versa, PHP provides us some built-in functions that we can use. for example: htmlspecialchars, htmlsepcialchars_decode, strip_tags, htmlentities, html_entity_decode.


IE's non-standard image MIME type

When writing scripts for uploading images, we usually check the MIME type of each uploaded file to make sure that the file types are what we expect. It’s quite easy to do so by querying the “type” property of the uploaded file object.


DOMDocument to load and parse HTML

Sometimes we need to deal with HTML files or strings, for example, grab a section of html string, find value of a particular tag, or get the arribute of a tag, we may use DOMDocument class (php5). this article writes down briefly what I learned about this


SUNWEB EXPERT