Short video - Scan de dossiers et exécution de commandes système en PHP

27 Dec 2022 · 2 min
2:03

The video explains how to use PHP's exec function to run external system commands, specifically the Unix 'ls' command, in order to list directory contents. It shows that exec takes a command string and can optionally receive a second argument that captures the command's output into an array. The presenter demonstrates assigning the output of 'ls' to a variable, then iterating over the array with a foreach loop to display each entry. He further illustrates adding typical ls options such as -l for detailed file information (permissions, owner, group, size, modification date, and file type) and -a to include hidden files. The tutorial also explains how to interpret the detailed output, identifying directories, regular files, and symbolic links based on the leading character. Overall, the content provides a practical, step‑by‑step guide for scanning directories and retrieving system command results directly from PHP scripts.

Chapters

More from Yamossoun

8:56
youtube.com

Compteur synchrone - Logique séquentielle

2w ago
11:58
youtube.com

Compteur asynchrone et diviseur de fréquence - Logique séquentielle

3w ago
11:37
youtube.com

Les registres (parallèle et à décalage) - Logique séquentielle

1mo ago
6:14
youtube.com

Bascule T (Toggle) - Logique séquentielle

1mo ago
12:05
youtube.com

Bascule JK - Logique séquentielle

1mo ago
9:17
youtube.com

Bascule D flip-flop active sur front montant - Logique séquentielle

1mo ago
10:08
youtube.com

Bascule D Latch - Logique séquentielle

1mo ago
8:13
youtube.com

Bascule RS - Logique séquentielle

1mo ago
5:04
youtube.com

Logique séquentielle - Introduction

2mo ago
1:15
youtube.com

Le codeur - Logique combinatoire #codeur #logique #circuit #booleanlogic

2mo ago
1:56
youtube.com

Algorithme de calcule de la racine carrée par dichotomie #dichotomy #squareroot #algorithm

3mo ago
See all content