From 0e745ce25671005727b4228fa6bce6417e89321f Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Wed, 27 Aug 2025 12:30:59 -0400 Subject: [PATCH] unienv seems almost ready --- www/unienv.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/www/unienv.php b/www/unienv.php index 37ca081..98cf2ea 100644 --- a/www/unienv.php +++ b/www/unienv.php @@ -28,17 +28,23 @@ while ($proceed==true) { $phase=999; } break; - case 3 : //scanning file + case 2 : //scanning file while (($line=fgets($fopen))!==false) { - if ((substr(trim($line),0,1)=='#') + if (substr(trim($line),0,1)=='#') continue; if (empty(trim($line))) continue; $line_no_comment=explode("#",$line,2)[0]; - echo ("no_com=<$line_no_comment>\n"); + $env_ex=preg_split('/(\s?)\=(\s?)/',$line_no_comment); + $env_name=trim($env_ex[0]); + $env_value=""; + if (isset($env_ex[1])) + $env_value=trim($env_ex[1]); + putenv($env_name,$env_value); + echo ("$env_name is equal to <$getenv($env_name)>\n"); } break; - case 4 : //closing file + case 3 : //closing file fclose($fopen); break; default : //SAFE Guard -- 2.47.3