How to use the stat function

藏色散人
Release: 2023-04-05 08:58:01
Original
4159 people have browsed it

php stat() function is used to give file information.

How to use the stat function

php stat() function Syntax

Function: Return information about the file.

Syntax:

stat(file)
Copy after login

Parameters:

file Required. Specifies the documents to be checked.

Description: Get the statistical information of the file specified by file. If file is a symbolic link, the statistics are about the connected file itself, not the symbolic link. If an error occurs, stat() returns false and issues a warning.

php stat() function example

<?php
$file = stat("./test.txt");
print_r($file);
?>
Copy after login

This article is an introduction to the PHP stat function. I hope it will be helpful to friends in need!

The above is the detailed content of How to use the stat function. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!