summaryrefslogtreecommitdiff
path: root/php/functions.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2022-11-25 03:59:32 +0100
committerpolo <ordipolo@gmx.fr>2022-11-25 03:59:32 +0100
commitefe371fd6e883dde99ca6d90a7aae99eb4aeadea (patch)
tree54b342e58e4e3908abf5f42c85680d32540dd7f3 /php/functions.php
downloadAppliGestionPHP-efe371fd6e883dde99ca6d90a7aae99eb4aeadea.zip
première sauvegarde git
Diffstat (limited to 'php/functions.php')
-rw-r--r--php/functions.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/php/functions.php b/php/functions.php
new file mode 100644
index 0000000..61bc13e
--- /dev/null
+++ b/php/functions.php
@@ -0,0 +1,26 @@
1<?php
2// php/functions.php
3
4// commande pour lancer une application graphique en ouvrant un fichier
5function window_app_command(string $app, string $path = ''): string
6{
7 $command = 'nohup ' . $app; // détache l'appli du script PHP
8 if($path != '')
9 {
10 $command .= ' ' . $path;
11 }
12 $command .= ' > /dev/null 2>&1 &';
13 // stdout > /dev/null et & permettent de rendre la main à PHP
14 // stderr > stdout pour cacher un message inutile
15 return $command;
16}
17
18function recherche_client(string $saisie): array
19{
20 $resultats = [];
21
22 // recherche dans la BDD
23
24
25 return($resultats);
26}