Commit 0851e389 authored by anne munoz's avatar anne munoz Committed by Adam Wujek

www: check if file exists before creating

Could you change it a little bit more? Can you make it to the way if there is no file /tmp/www_wrs_version then execute the command. Otherwise read the existing file
parent 5f1385d9
......@@ -15,7 +15,10 @@
#Save info to temp file so we dont have to execute command at each call
$_SESSION["WRSVERSIONTMP"] = shell_exec("/wr/bin/wrs_version -t > /tmp/wrversion");
$file_version = "/tmp/wrversion";
if (!file_exists($file_version)) {
$_SESSION["WRSVERSIONTMP"] = shell_exec("/wr/bin/wrs_version -t > .$file_version.");
$outputfilename = "/var/www/data/wrs-info.php";
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment