PHP simple source code to learn the source code on the book, a lot of, every knock will be annoying, the Internet buckle segment traversal File Code: http://www.web589.com/posts/808.htmlauthor written error, note very detailed < ;? Php $ var = "put the current directory, so the file is used as a hyperlink to 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 ");