view interface/load_regex.php @ 14:ac77748bb813

- Load regex files based on current topic. Only show the regex in this topic. To do that, it needs to lookup a table called 'topic_regex_relation' which has the relation of topic and regex filename in filesystem. - Extractapp UI with some layout modification: button, popup window, responsive (by bootstrap now). It was just for quick prototyping.
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Thu, 19 Feb 2015 11:07:27 +0100
parents 63e08b98032f
children
line wrap: on
line source

<?php

$returnArray = array();
$files1 = scandir("regex_files");
foreach ( $files1 as $file ) {
	if ( $file != "." && $file != ".." ) {
		
		$returnArray[preg_replace("/\.txt/", "", $file)] = file_get_contents( "regex_files/".$file );
	}
}

echo json_encode($returnArray);
?>