Processing path

PHP has many features for the analysis and processing of text variables that contain the path to the file. The basename ($ path) returns the name of the file…

Operations on files and directories

To copy a file using a function called copy (). The first parameter is the source file and the second is the destination file or directory. This function returns true if the copy succeeded, or false otherwise. It is good to check whether the copying was successful.Mountains Photo


Information functions

When scripts for server maintenance or, for example, analyzing the file system, it is necessary to obtain information about a particular file. PHP offers a whole set of functions that return data on file with the specified path. I think it is best punch.RPK Tramplin


file Locking

It can lead to a situation in which two or more people at a time will come to the site or just run the script. If it is, for example, counter that stores the number of visits in the file, these few people will want to save data to a file at the same time. This can lead to loss of data from this counter. But it is enough to apply the mechanism locks to prevent such a situation.Блоки бетонные для стен подвалов


Crop your files

PHP includes a function for reducing the file size to the desired size. The ftruncate (int index, int size) is just such a thing. Keep in mind that any data…

Write to File

The data file can be saved with fputs (int pointer, string string, int length). As with most of the functions that operate on files, it is necessary to specify the file pointer to where we want to


Reading from files

Reading from a file can be carried out in 2 ways one is a „low-level” reading data from a file using fread (int index, int length). It reads the data read from the file specified by the previously created „indicator”. The data are read to the length specified in the second parameter. If the data is less than the specified length, it will be returned all the data from the file.Оранжевый цвет в интерьере. Сочетания оранжевого цвета в интерьере с другими цветами


The internal file pointer

The internal file pointer, means the place in the file indicating the current location ‚- ie the place in which would start the writing or reading. Most of the functions that operate on files will shift this ratio – every save and read from the file will shift this indicator. (więcej…)

Opening and closing files

All functions use the file as a parameter called charge. „Pointer to the file.” It is a variable that specifies the file open. This is necessary because the script can open multiple files at once and at all work


Close Menu