blob: 61bc13e02f5084ea5f93529e65c0d3f999704835 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<?php
// php/functions.php
// commande pour lancer une application graphique en ouvrant un fichier
function window_app_command(string $app, string $path = ''): string
{
$command = 'nohup ' . $app; // détache l'appli du script PHP
if($path != '')
{
$command .= ' ' . $path;
}
$command .= ' > /dev/null 2>&1 &';
// stdout > /dev/null et & permettent de rendre la main à PHP
// stderr > stdout pour cacher un message inutile
return $command;
}
function recherche_client(string $saisie): array
{
$resultats = [];
// recherche dans la BDD
return($resultats);
}
|