Hello all,
I'm creating my own templatesystem because I only need a few little operations to be supported. One of them is loading widgets with dynamic data generated from a database in my template.
Is there a way to parse PHP code, don't display the result but store it in a variable and then use the generated source from that variable...
How to write this without goto:
ob_start();
$a = 0;
echo "START of LEFT<br />";
begin:
if($a > 0) {
echo "CONTENT LEFT: $a<BR />";
<VERY DIFFICULT ALGORHITM>
goto end;
}
<... ALL THE REST CODE OF LEFT ...>
echo "END of LEFT<br /><br />";
$output1 = ob_get_contents();
ob_end_clean();
ob_start();
echo "START ...
This script worked fine for a few weeks then stopped working for no reason.
1.<?php
2.ob_start();
3.include "weather xml website";
4.$data=ob_get_contents();
5.ob_clean();
6.
7.$xmlFile = 'filelocation\weatherData.xml';
8.
9.
10.$fh = fopen($xmlFile, 'w') or die("can not create or open $xmlFile");
11.
12.fwrite($fh, $data);
13.fclose($f...