<?php
	class FileDemo
	{
		function Test()
		{
			print __FILE__."<br/>";  //返回文件完整路径,如 E://PHP/Test/Index.php
			print basename(__FILE__)."<br/>"; //返回文件名,如 Index.php
			print dirname(__FILE__);//返回文件目录信息,如 E://PHP/Test
		}
	}
	
	$f = new FileDemo();
	$f->Test();
?>

 

相关文章:

  • 2021-07-06
  • 2021-09-20
  • 2021-06-01
  • 2021-12-31
  • 2022-01-29
  • 2021-05-28
  • 2021-05-30
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2021-12-11
相关资源
相似解决方案