Which function is used to find files in php

Menu

  • H

    Home
  • A

    Aptitude
  • E

    English
  • R

    Reasoning
  • D

    DI
  • G

    GK
  • C

    Current Affairs
  • I

    Interview
  • Computer
    • C

      Computer Fundamentals
    • N

      Networking
    • S

      SQL
    • D

      Database
  • Programming
    • C

      C Program
    • J

      Java Program
    • H

      HTML
    • C

      CSS
    • J

      Javascript
    • P

      PHP Program
  • Engineering
    • C

      Computer Science
    • E

      Electrical Engineering
    • M

      Mechanical Engineering
    • C

      Civil Engineering
    • C

      Chemical Engineering
  • More
    • B

      Banking Awareness
    • C

      Commerce
    • M

      Management
  • A

    Ask Question

  • Home
  • Aptitude
  • English
  • Reasoning
  • DI
  • GK
  • Current Affairs
  • Interview
  • Computer
    • Computer Fundamentals
    • Networking
    • SQL
    • Database
  • Programming
    • C Program
    • Java Program
    • HTML
    • CSS
    • Javascript
    • PHP Program
  • Engineering
    • Computer Science
    • Electrical Engineering
    • Mechanical Engineering
    • Civil Engineering
    • Chemical Engineering
  • More
    • Banking Awareness
    • Commerce
    • Management
  • Ask Question

Which one of the following PHP functions can be used to find files?

A. glob[]

B. file[]

C. fold[]

D. get_file[]

Answer: Option A

Solution[By Examveda Team]

Here is an example-

// get all php files AND txt files
$files = glob['*.{php,txt}', GLOB_BRACE];  
print_r[$files];  
/* output looks like: 
Array 
    [ 
        [0] => phptest.php 
        [1] => pi.php 
        [2] => post_output.php
        .
        .
        .
]


Click here to read 1000+ Related Questions on Functions[PHP]

Join The Discussion

Related Questions on Functions

asked Jul 28, 2021 in PHP by [87.0k points]

Which one of the following PHP functions can be used to find files?

[a] glob[]

[b] file[]

[c] fold[]

[d] get_file[]

The question was asked in an international level competition.

My doubt is from In-Built Functions in PHP topic in division Arrays and Functions of PHP

1 Answer

Related questions

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

asked Jul 28, 2021 in PHP by Evelyn [87.0k points]

...

Which PHP function is used to find files file [] fold [] glob [] None of the above?

Answer: B] glob[] is used to find files. 27. Identify the function which is used to compress a string.

What is $_ files in PHP?

$_FILES is a two-dimensional associative global array of items which are being uploaded via the HTTP POST method and holds the attributes of files such as: Attribute. Description. [name] Name of file which is uploading.

What are the functions of files?

Answer: file is an object on a computer that stores data, information, settings, or commands used with a computer program. In a GUI [graphical user interface], such as Microsoft Windows, files display as icons that relate to the program that opens the file.

What are PHP functions used for?

A function is a piece of code that takes another input in the form of a parameter, processes it, and then returns a value. A PHP Function feature is a piece of code that can be used over and over again and accepts argument lists as input, and returns a value. PHP comes with thousands of built-in features.

Chủ Đề