Opens a file for reading and/or writing. This file can be
stored on the server's hard disk, or PHP can load it from a URL just like a Web
browser would.
| ||
Tells PHP you're finished reading/writing a particular file
and releases it for other programs or scripts to use.
| ||
Reads data from a file into a PHP variable. Allows you to
specify how much information (i.e. how many characters or bytes) to
read.
| ||
Writes data from a PHP variable into a
file.
| ||
Performs a run-of-the-mill file copy
operation.
| ||
Deletes a file from the hard disk.
Through examination of server logs, you'll probably find that this is one of the most requested pages on your site. If you ask yourself some of the questions above, you'll realize that this page doesn't have to be dynamically generated for every request. As long as it's updated every time new content is added to your site, it'll be as dynamic as it needs to be. With a PHP script, you can generate a static snapshot of the dynamic page's output and put this snapshot online, in place of the dynamic version . By converting high-traffic dynamic pages into semi-dynamic equivalents, which are static pages that get dynamically regenerated at regular intervals to freshen their content, you can go a long way towards reducing the toll that the database-driven components of your site take on your Web server's performance. Website, you probably see site traffic as something you'd like to encourage. Unfortunately, high site traffic is just the kind of thing that a Web server administrator dreads—especially when that site is primarily composed of dynamically generated, database-driven pages. Such pages take a great deal more horsepower from the computer that runs the Web server software than plain, old HTML files do, because every page request is like a miniature program that runs on that computer.
|
PHP file functions
PMA05:13
Categories: PHP