PHP simple source code learning

Source: Internet
Author: User
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 ");

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.