sort by

In this tutorial I will be deeply explaining in detail the many modes of the PHP function fwrite(). Yes, fwrite() is used to write data to files, however the way it is written to the file changes with each mode. In each mode, I will explain its purpose, provide an example, and then explain the code within the example.

An RSS feed is a great way to serve up your content to users. However, if you're not using a standard CMS or blogging platform you may not have an RSS feed generated for you automatically.
This tutorial will show you how to create an RSS feed in a few simple steps. If you can query your database to get information about your articles, you can complete this tutorial and build a custom feed.

This PHP / jQuery tutorial explains how-to upload a file PHP from ThickBox and how after successful upload the filename is passed to the parent document. The function is a useful addition for custom content management systems.

PHP makes uploading files easy. You can upload any type of file to your Web server. In spite of security issues that should be addressed before enabling file uploads, the actual mechanisms to allow this are straight forward. In this tutorial we will consider how to upload files to some directory on your Web server. We will also discuss security issues concerned with the file uploading.

As is necessary for any language, PHP has a complete set of directory support functions. PHP gives you a variety of functions to read and manipulate directories and directory entries. Like other file-related parts of PHP, the functions are similar to the C functions that accomplish the same tasks, with some simplifications. This tutorial describes how PHP handles directories. You will look at how to create, remove, and read them.

Creating zip files on a web server is a feature which could be very useful for backups or just for offering an unknown number of dynamic files or folder inside of a directory. This tutorial shows us how handle that with only a few rows of PHP code!

The best practices for finding files with PHP has evolved a lot in a the last few years. Back in 2004, one of the very first thing I did with PHP was porting the File::Find::Rule Perl module to PHP. File::Find::Rule is a great way to describe the files and directories you want to work with. I used the opendir, readdir, and closedir native PHP functions, and it did the job quite well. The PHP class was named sfFinder, and it can still be found in all symfony versions. Even if the class is bundled with symfony, I know that a few people use it for all kind of stuff, not necessarily related to symfony.

Want to prevent people from linking to your downloads? This script will force a page to be loaded before the download starts. HTML header statements are used to trigger the download of the file. PHP is used to push the file to the browser.

This tutorial covers both standard tasks such as reading and writing files, and advanced tasks such as archiving files in ZIP or BZ2 format. Many of these tasks can be solved in different, equally usable ways, so you truly have the freedom of choice.

This tutorial is intended for the PHP programmer who needs to incorporate PDF generation in a script without using external libraries such as PDFlib (often unavailable due to licensing restrictions or lack of funds).

This tutorial is intended for PHP programmers that wish to use the Filesystem Functions of PHP to create files on their webserver via PHP. A basic understanding of PHP and file systems in general is assumed.

There is a powerful yet somewhat unheard of function in PHP titled glob(). Many beginners and intermediates alike struggle with the traversing of directories. Acquiring the directories contents and returning them in a readable format. If only they know how so very easy this task was!