Home > Backend Development > PHP Tutorial > PHP简略源码学习

PHP简略源码学习

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 10:41:02
Original
912 people have browsed it

PHP简单源码学习
书上的源代码,好多个,每个都要敲就烦死了,
上网扣了段遍历文件的代码:http://www.web589.com/posts/808.html
作者写得不错的嘛,注释非常详细

<?php $var = "把当前目录下,所以文件以超链接形式给出<br /><br>";		function directory($dir){		$dp = opendir($dir);		while($file = readdir($dp)){			if($file !="." && $file !=".."){				$path=$dir. "/". $file;	/* 取得目录路径 */								if(is_dir($path)){	/* 判断是否有子目录 */					directory($path);	/* 函数递归调用 */					echo "<br><hr>";				}				else{ 					printf('<a href="'.%24path.'" target="_blank">'.$path.'</a><br><br>');				}			}		}		closedir($dp);	} 	directory(".");?>
Copy after login



<?php phpinfo();?>   $number = "5";               # $number is a string   $sum = 15 + $number;   	# Add an integer and string to produce integer   print("$sum\n");
Copy after login
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
access path
From 1970-01-01 08:00:00
0
0
0
Static resource path usage
From 1970-01-01 08:00:00
0
0
0
objective-c - header search path
From 1970-01-01 08:00:00
0
0
0
javascript - vue src path problem
From 1970-01-01 08:00:00
0
0
0
php move_uploaded_file() path parameter usage
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template