
<?php
$path="F:/6/htdocs/cyg.php";
echo basename($path);
echo "<br />";
echo basename($path,".php");

<?php
echo chmod("F:/6/htdocs/cyg.php",0600);
echo chmod("F:/6/htdocs/cyg.php",0644);
echo chmod("F:/6/htdocs/cyg.php",0755);
echo chmod("F:/6/htdocs/cyg.php",0740);

<?php
echo filesize("F:/6/htdocs/1.php");
$file=fopen("F:/6/htdocs/1.php","a+");
ftruncate($file,100);
fclose($file);
clearstatcache();
echo filesize("F:/6/htdocs/1.php");
原来: 
截取后: 
<?php
echo copy("F:/6/htdocs/cyg.php","F:/6/htdocs/666.php");

<?php
$file="F:/6/htdocs/666.php";
unlink($file);
<?php
echo dirname("F:/6/htdocs/666.php");
echo "<br />";
echo dirname("/6/htdocs/666.php");

<?php
echo disk_free_space("E:");

<?php
echo disk_total_space("F:/6/htdocs");

<?php
$file = fopen("F:/6/htdocs/1.php", "r");
while(! feof($file))
{
echo fgets($file). "<br />";
}
fclose($file);
?>

<?php
$file = fopen("F:/6/htdocs/1.php","r");
echo fgetc($file);
fclose($file);

<?php
$file = fopen("F:/6/htdocs/demo.php","r");
echo fgetss($file);
fclose($file);

<?php
$file = fopen("F:/6/htdocs/demo.php","r");
echo fgetss($file,1024,"<p>");
fclose($file);

<?php
print_r(file("F:/6/htdocs/demo.php"));

<?php
print_r(file_exists("F:/6/htdocs/demo.php"));

<?php
var_dump(file_get_contents("F:/6/htdocs/demo.php"));

<?php
echo file_put_contents("F:/6/htdocs/demo.php", "Hello World. Testing!");

<?php
date_default_timezone_set('Asia/Shanghai');
echo fileatime("F:/6/htdocs/demo.php");
echo "<br />";
echo date("F d Y H:i:s",fileatime("F:/6/htdocs/demo.php"));

<?php
date_default_timezone_set('Asia/Shanghai');
echo fileatime("F:/6/htdocs/demo.php");
echo "<br />";
echo date("F d Y H:i:s",filectime("F:/6/htdocs/demo.php"));

<?php
echo filegroup("F:/6/htdocs/demo.php");

<?php
var_dump(fileinode("F:/6/htdocs/demo.php"));

<?php
date_default_timezone_set('Asia/Shanghai');
echo filemtime("F:/6/htdocs/demo.php");
echo "<br />";
echo "Last modified: ".date("F d Y H:i:s.",filemtime("test.txt"));
?>

<?php
var_dump(fileowner("F:/6/htdocs/demo.php"));

<?php
var_dump(fileperms("F:/6/htdocs/demo.php"));

<?php
var_dump(filesize("F:/6/htdocs/demo.php"));

<?php
var_dump(filetype("F:/6/htdocs/demo.php"));

<?php
$file=fopen("F:/6/htdocs/demo.php","w+");
if(flock($file,LOCK_EX))
{
fwrite($file,"cyg");
flock($file,LOCK_UN);
}
else
{
echo "Error locking file!";
}fclose($file);

<?php
$file = fopen("F:/6/htdocs/demo.php","r");
fgets($file);
echo fpassthru($file);
fclose($file);

<?php
$file=fopen("F:/6/htdocs/demo.php", "w");
echo fputs($file,"liwen&cyg");
fclose($file);

<?php
$file=fopen("F:/6/htdocs/demo.php", "r");
echo fread($file,filesize("F:/6/htdocs/demo.php"));
fclose($file);

<?php
$file=fopen("F:/6/htdocs/demo.php", "r");
echo fread($file,10);
fclose($file);

<?php
$file=fopen("F:/6/htdocs/demo.php", "r");
echo fgets($file);
echo "<br />";
echo fseek($file,0);

<?php
$file=fopen("F:/6/htdocs/demo.php", "r");
print_r(fstat($file));
fclose($file);

<?php
$file=fopen("F:/6/htdocs/demo.php", "r");
echo ftell($file);
fseek($file,"3");
echo ftell($file);
fclose($file);

|