Example that implements inclued into an applicationThis example demonstrates the process of implementing inclued into an existing application, and viewing the results.
Example #1 Getting the data within the PHP application itself (function)
<?php 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 #2 Example use of gengraph.php This example creates an image named inclued.png that shows the inclued data. # First, create the dot file $ php gengraph.php -i /tmp/wp.ser -o wp.dot # Next, create the image $ dot -Tpng -o inclued.png wp.dot
Example #3 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.
<?php The above example will output something similar to: PATH: /tmp/inclued Inclued file: inclued.56521.1 -- filename: /Users/philip/test.php -- number of includes: 1 Inclued file: inclued.56563.1 -- filename: /tmp/none.php -- number of includes: 0 Inclued file: inclued.56636.1 -- filename: /tmp/three.php -- number of includes: 3 |