Browse Source

remove absolute paths

Jan Behrens 4 years ago
parent
commit
377519534b
6 changed files with 8 additions and 8 deletions
  1. 1 1
      Net/SFTP.php
  2. 1 1
      Net/SSH2.php
  3. 1 1
      aircois_convert_csv_to_array.php
  4. 3 3
      getFluxTube.php
  5. 1 1
      poll_HV_data.php
  6. 1 1
      poll_HV_data_old.php

+ 1 - 1
Net/SFTP.php

@@ -1,5 +1,5 @@
 <?php
-set_include_path('/var/www/sdsstatus/');
+set_include_path('');
 
 /**
  * Pure-PHP implementation of SFTP.

+ 1 - 1
Net/SSH2.php

@@ -1,5 +1,5 @@
 <?php
-set_include_path('/var/www/sdsstatus/'); 
+set_include_path(''); 
 
 /**
  * Pure-PHP implementation of SSHv2.

+ 1 - 1
aircois_convert_csv_to_array.php

@@ -20,7 +20,7 @@ $lfcs = array(    // current 14 is inverted, negative value in definition must b
 
 // write air coil array to file
 $strFileContent = "<"."?php".PHP_EOL."$"."aircoil_settings = ".var_export($lfcs, true).";".PHP_EOL.PHP_EOL."?".">".PHP_EOL;
-$file_w = fopen('/var/www/html/sdsstatus/aircoils_settings.php', 'w+');
+$file_w = fopen('aircoils_settings.php', 'w+');
 //sleep(5);
 fwrite($file_w, $strFileContent);
 fclose($file_w);

+ 3 - 3
getFluxTube.php

@@ -6,7 +6,7 @@
 
 <?php
 
-	set_include_path('/var/www/sdsstatus/');
+	set_include_path('');
 
 	include('Net/SSH2.php');
 	$ssh = new Net_SSH2('141.52.188.80');
@@ -20,7 +20,7 @@
 		exit('Login Failed');
 	}
 
-	foreach (glob("/var/www/sdsstatus/fluxtube/*") as $file)
+	foreach (glob("fluxtube/*") as $file)
 	{
 		$fp = fopen($file, "r+");
 
@@ -79,7 +79,7 @@
 	}
 
 /*
-	foreach (glob("/var/www/sdsstatus/fluxtube/*") as $file)
+	foreach (glob("fluxtube/*") as $file)
 	{
 		$fp = fopen($file, "r+");
 		if (fread($fp, filesize($file)) == "")

+ 1 - 1
poll_HV_data.php

@@ -207,7 +207,7 @@ do {
   
   // write ADEI data to file 
   //echo "Writing data to file.".PHP_EOL;
-  $file_w = fopen('/var/www/html/sdsstatus/ADEI_HV_readings.php', 'w+');
+  $file_w = fopen('ADEI_HV_readings.php', 'w+');
   sleep(1);
   fwrite($file_w, $strFileContent);
   fclose($file_w);

+ 1 - 1
poll_HV_data_old.php

@@ -195,7 +195,7 @@ $strFileContent .= "?".">".PHP_EOL;
 
 // write ADEI data to file
 //echo "Writing data to file.".PHP_EOL;
-$file_w = fopen('/var/www/html/sdsstatus/ADEI_HV_readings.php', 'w+');
+$file_w = fopen('ADEI_HV_readings.php', 'w+');
 //sleep(5);
 fwrite($file_w, $strFileContent);
 fclose($file_w);