Php is_executable determines whether a given file name can be executed for an instance,

Source: Internet
Author: User

Php is_executable determines whether a given file name can be executed for an instance,

The php is_executable function is used to determine whether a file can be executed. If the file exists and is executable, TRUE is returned. If an error occurs, FALSE is returned, this article introduces the basic syntax and instance of the is_executable function.

Introduction to php is_executable Functions

The is_executable function is used to determine whether a given file name is executable.

Syntax:

Bool is_executable (string $ filename)

Determines whether a given file name is executable.

Parameters:

The path of the filename file.

Return Value:

If the file exists and is executable, TRUE is returned, and FALSE is returned when an error occurs.

Php is_executable function instance

Use is_executable to determine whether the permissions. php file can be executed. The Code is as follows:

<? Php $ file_name = "permissions. php "; // Only works on Windows with PHP 5.0.0 or laterif (is_executable ($ file_name) {echo (" The file $ file_name is executable. <br/> ");} else {echo (" The file $ file_name is not executable. <br/> ") ;}?>

The above is to sort out the documents for php is_executable to determine whether the given file name can be executed. We will continue to add relevant materials in the future. Thank you for your support for this site!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.