Skip to Content
PHP Pocket Reference
book

PHP Pocket Reference

by Rasmus Lerdorf
January 2000
Beginner to intermediate
128 pages
1h 48m
English
O'Reilly Media, Inc.
Content preview from PHP Pocket Reference

File Functions

The following functions manipulate the local filesystem or data from the filesystem in some manner:

string basename(string path)

Return the filename component of the path

int chgrp(string filename, mixed group)

Change the file group

int chmod(string filename, int mode)

Change the file mode

int chown(string filename, mixed user)

Change the file owner

void clearstatcache(void)

Clear the file stat cache

int copy(string source_file, string destination_file)

Copy a file

string dirname(string path)

Return the directory name component of the path

bool diskfree(string path)

Return the number of free kilobytes in path

int fclose(int fp)

Close an open file pointer

int feof(int fp)

Test for end-of-file on a file pointer

string fgetc(int fp)

Get a character from the file pointer

array fgetcsv(int fp, int length)

Get line from file pointer and parse for CSV fields

string fgets(int fp, int length)

Get a line from the file pointer

string fgetss(int fp, int length [, string allowable_tags])

Get a line from the file pointer and strip HTML tags

array file(string filename [, int use_include_path])

Read an entire file into an array

int file_exists(string filename)

Check whether a file exists or not

int fileatime(string filename)

Get the last access time for a file

int filectime(string filename)

Get the last inode status change for a file

int filegroup(string filename)

Return the group ID of the file

int fileinode(string filename)

Return the inode number of the file

int filemtime(string filename)

Return the time the file ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

PHP Pocket Reference, 2nd Edition

PHP Pocket Reference, 2nd Edition

Rasmus Lerdorf
PHP 7: Real World Application Development

PHP 7: Real World Application Development

Doug Bierer, Altaf Hussain, Branko Ajzele
Professional LAMP: Linux®, Apache, MySQL®, and PHP5 Web Development

Professional LAMP: Linux®, Apache, MySQL®, and PHP5 Web Development

Jason Gerner, Elizabeth Naramore, Morgan L. Owens, Matt Warden

Publisher Resources

ISBN: 1565927699Catalog PageErrata