<?php header('Access-Control-Allow-Origin: https://fis.ru.ac.th'); header('Access-Control-Allow-Methods: POST'); header('Access-Control-Allow-Headers: Content-Type'); $myfile = fopen("./QRTRAN/report/BPQR_210910.txt", "r") or die("Unable to open file!"); // Output one line until end-of-file while(!feof($myfile)) { echo fgets($myfile) . "<br>"; } fclose($myfile); ?>