I have a script (save_html_output_1.php) that requires a file ("patient_query_last_insert_KCP.php")The file
1. accesses a mysql table
2.processes the data with a series of algorithms
3.writes the output in html table format.
This file "patient_query_last_insert_KCP.php" works ok when manually loaded through IE.
However, when I run the script "save_html_output_1" the following error message occurs:
Parse error: syntax error, unexpected $end in /homepages/21/d157913018/htdocs/abis/practice/save_html_output_1.php on line 10
I want to automate the steps of accessing file "patient_query_last_insert_KCP.php", saving the results and emailing them.
As a first step I have a smalll script (save_html_output_1.php) to run file ("patient_query_last_insert_KCP.php") and save it for later use. I found the "save_html_output_1.php" script on a forum after considerable search. The author claims to have tested the script and said it works.
Searches I have made turn up suggestions about not using short form of php call, that is using full php declaration<?php and ?>. That does not seem to be the problem.
Ideas about how to correct this problem much appreciated.
<?php ob_start(); require_once('http://www.headacheanalysis.com/patient_query_lastinsert_KPC.php'); $output = ob_get_contents(); // Print the test result; print $output; // Save the test result to a file file_put_contents("C:\Users\John\Documents\", $output); ob_end_clean(); ?>