annotate pseudo.php @ 1308:d23de1f2229e

PHP Comment Parser exports to XML, JSON and CSV notations. Included HTML file interface.
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Wed, 17 Feb 2016 17:27:29 +0000
parents cc55cc323592
children
rev   line source
nickjillings@1306 1 <?php
nickjillings@1306 2 header('Access-Control-Allow-Origin: *');
nickjillings@1306 3 header("Content-type: text/xml");
nickjillings@1306 4 $files = glob('saves/' . '*.xml');
nickjillings@1306 5 $numsaves = 0;
nickjillings@1306 6 if ( $files !== false )
nickjillings@1306 7 {
nickjillings@1306 8 $numsaves = count( $files );
nickjillings@1306 9 }
nickjillings@1306 10
nickjillings@1306 11 $files = glob('pseudo/' . '*.xml');
nickjillings@1306 12 $numtests = 0;
nickjillings@1306 13 if ( $numtests !== false )
nickjillings@1306 14 {
nickjillings@1306 15 $numtests = count( $files );
nickjillings@1306 16 }
nickjillings@1306 17
nickjillings@1306 18 $testID = ($numsaves % $numtests)-1;
nickjillings@1306 19
nickjillings@1306 20 readfile($files[$testID]);
nickjillings@1306 21 ?>