PHP simple source code to learn the source code in the book, a lot of, every knock is annoying, the Internet buckle paragraph traversal File Code: www.web589.composts808.html author write well, the comment is very detailed & lt ;? Php $ var put the current directory, so the file is given as a hyperlink & lt; br & gt; functiondi PHP simple source code learning
There are a lot of source code in the book, and every one of them is annoying,
The code for skipping a file segment on the Internet: http://www.web589.com/posts/808.html
Well written by the Author. the comments are very detailed.
"; Function directory ($ dir) {$ dp = opendir ($ dir); while ($ file = readdir ($ dp) {if ($ file! = "." & $ File! = ".. ") {$ Path = $ dir. "/". $ file;/* obtain the directory path */if (is_dir ($ path) {/* determine whether a subdirectory exists */directory ($ path ); /* recursive function call */echo"
";} Else {printf (''. $ path .'
') ;}} Closedir ($ dp) ;}directory (".") ;?>
$ Number = "5"; # $ number is a string $ sum = 15 + $ number; # Add an integer and string to produce integer print ("$ sum \ n ");