&reftitle.examples;
Example that implements inclued into an application This example demonstrates the process of implementing inclued into an existing application, and viewing the results. Getting the data within the PHP application itself (function) ]]> Now that some data exists, it's time to make sense of it in the form of a graph. The inclued extension includes a PHP file named gengraph.php that creates a dot file that requires the graphviz library. However, this form is not required. Example use of gengraph.php This example creates an image named inclued.png that shows the inclued data. Listing data via inclued dumps (configuration) When using the inclued.dumpdir directive, files (include clues) are dumped with every request. Here's one way to list those files, and unserialize them. count() === 0) { echo 'No clues today', PHP_EOL; exit; } foreach ($inclues as $inclue) { echo 'Inclued file: ', $inclue->getFilename(), PHP_EOL; $data = file_get_contents($inclue->getPathname()); if ($data) { $inc = unserialize($data); echo ' -- filename: ', $inc['request']['SCRIPT_FILENAME'], PHP_EOL; echo ' -- number of includes: ', count($inc['includes']), PHP_EOL; } echo PHP_EOL; } } else { echo 'I am totally clueless today.', PHP_EOL; } ?> ]]> &example.outputs.similar;