readding write_config.php for testing

This commit is contained in:
mcguirepr89
2022-01-20 15:31:05 -05:00
parent 11915d83eb
commit b7f03704dd
+14
View File
@@ -0,0 +1,14 @@
<?php
if(isset($_POST['field1']) && isset($_POST['field2'])) {
$data = $_POST['field1'] . '-' . $_POST['field2'] . "\r\n";
$ret = file_put_contents('/tmp/mydata.txt', $data, FILE_APPEND | LOCK_EX);
if($ret === false) {
die('There was an error writing this file');
}
else {
echo "$ret bytes written to file";
}
}
else {
die('no post data to process');
}