次のような感じ?
<?php $data_type = $_REQUEST['data_type']; $user_id = $_SERVER['REMOTE_USER']; $filename = '/home/end0tknr/dev/Test/'. $data_type .'/'. $user_id .'.txt'; if(! file_exists($filename) ) { header("HTTP/1.0 404 Not Found"); return; } $filecontent = file_get_contents($filename); header("Content-Type: text/plain; charset=utf-8"); echo($filecontent); ?>