svn: /phpdoc/en/trunk/reference/inclued/ examples.xml

From: Date: Tue, 22 Jun 2010 14:51:14 +0000
Subject: svn: /phpdoc/en/trunk/reference/inclued/ examples.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-6832@lists.php.net to get a copy of this message
philip Tue, 22 Jun 2010 14:51:14 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=300659 Log: Updated example to properly use serialize(), instead of json_encode(), as graphviz.php only supports serialize() today Changed paths: U phpdoc/en/trunk/reference/inclued/examples.xml Modified: phpdoc/en/trunk/reference/inclued/examples.xml =================================================================== --- phpdoc/en/trunk/reference/inclued/examples.xml 2010-06-22 14:35:05 UTC (rev 300658) +++ phpdoc/en/trunk/reference/inclued/examples.xml 2010-06-22 14:51:14 UTC (rev 300659) @@ -17,11 +17,11 @@ <![CDATA[ <?php // File to store the inclued information -$fp = fopen('/tmp/wp.json', 'w'); +$fp = fopen('/tmp/wp.ser', 'w'); if ($fp) { $clue = inclued_get_data(); if ($clue) { - fwrite($fp, json_encode($clue)); + fwrite($fp, serialize($clue)); } fclose($fp); } @@ -47,7 +47,7 @@ <programlisting role="shell"> <![CDATA[ # First, create the dot file -$ php graphviz.php -i /tmp/wp.json -o wp.dot +$ php graphviz.php -i /tmp/wp.ser -o wp.dot # Next, create the image $ dot -Tpng -o inclued.png wp.dot

« previous php.doc.cvs (#6832) next »