Convert date format timestamp

Timestamp other than the current can be achieved in various ways, which must be used according to application.
If there is broken ‘data, that is, in separate variables day, month, year, etc., Or can lead to such a situation by the appropriate use of funkcjiexplode () or substr (), you can use mktime (). This function takes as arguments respectively hour, minute, second, month, day, year.

(więcej…)

Getting the current date

The current date can be obtained only in the timestamp format. The date of the returns funkcjatime () task planner. Close-up times can be achieved thanks to the microtime () – data returned by this function are stored a little strange, because string is returned containing separated by a space, respectively microsecond part and seconds, or „msec sec”.

(więcej…)

Validation

One of the main issues when receiving data from the user to verify their correctness. The checkdate () takes three arguments – respectively, month, day and year, the correctness of which is to be checked. The function returns a Boolean value TRUE if the date is correct task planning.

(więcej…)

Processing date

PHP has many features that allow you to process the record date. The primary method of recording the date on Unix and derivatives is tzw.timestamp. This is the number of…

Operations on directories

<?php if ($dir = @opendir ( „/ tmp”)) { while ($file = readdir ($dir)) { echo „$file \ n”; } closedir ($dir); } ?> The second way Example <?php $d…

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 adirname…

Operations on files and directories

duplication
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.

(więcej…)

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.

(więcej…)

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 operate.

(więcej…)

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.

(więcej…)

Close Menu