Search
 
SCRIPT & CODE EXAMPLE
 

PHP

list all files in directory php

$path    = './';
$files = scandir($path);
$files = array_diff(scandir($path), array('.', '..'));
foreach($files as $file){
  echo "<a href='$file'>$file</a>";
}
Comment

require all files in directory php

foreach (scandir(dirname(__FILE__)) as $filename) {
    $path = dirname(__FILE__) . '/' . $filename;
    if (is_file($path)) {
        require $path;
    }
}
Comment

php get all php files in a directory

foreach(glob('includes/*.php') as $file) {
    ...
}
Comment

php list all files in directory

scandir ( string $directory [, int $sorting_order = SCANDIR_SORT_ASCENDING [, resource $context ]] ) : array
Comment

PREVIOUS NEXT
Code Example
Php :: laravel check if request wantsjson 
Php :: woocommerce get product categories 
Php :: how to add recaptcha to woocommerce register php 
Php :: php insert hyphen into spaces in string 
Php :: php get data from prepared select 
Php :: This page isn’t working php 
Php :: check type in php 
Php :: parametre grouping laravel quert 
Php :: php shutdown function 
Php :: laravel Command "laravel/ui" is not defined. 
Php :: api anaf 
Php :: run a server php terminal 
Php :: php table 
Php :: acf wp_query custom field 
Php :: wordpress thumbnail 
Php :: php syntax <<< 
Php :: laravel object to array 
Php :: wordpress get template directory 
Php :: if condition inside echo in php 
Php :: how to delete all products woocommerce in phpmyadmin 
Php :: multiple middleware laravel 
Php :: php weekdays 
Php :: target class usercontroller does not exist. in laravel 8 
Php :: php initialize array 
Php :: foreach loop laravel 
Php :: laravel insert timestamp now 
Php :: how to add an custom error to validater error in laravel 
Php :: php date object to timestamp 
Php :: php mysqli fetch single row 
Php :: get country from ip address 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =