• ? umask
  • Inotify ?
  • ����ѧԺ www.cainiaoplay.com
  • PHP Manual
  • �ļ�ϵͳ����
  • ɾ���ļ�

unlink

(PHP 4, PHP 5, PHP 7)

unlink — ɾ���ļ�

˵��

unlink ( string $filename [, resource $context ] ) : bool

ɾ�� filename���� Unix C �� unlink() �������ơ� ��������ʱ�����һ�� E_WARNING ����Ĵ���

����

filename

�ļ���·����

context

Note: �� PHP 5.0.0 �������˶������ģ�Context����֧�֡��й������ģ�Context����˵���μ� Streams��

����ֵ

�ɹ�ʱ���� TRUE�� ������ʧ��ʱ���� FALSE��

������־

�汾 ˵��
5.0.0 �� PHP 5.0.0 �� unlink() Ҳ��������ijЩ URL ��װЭ�顣�ο�֧�ֵ�Э��ͷ�װЭ�� �е��б���Щ��װЭ��֧�� unlink()��

����

Example #1 ������ unlink() �÷�

<?php
$fh 
= fopen('test.html', 'a');
fwrite($fh, '<h1>Hello world!</h1>');
fclose($fh);

unlink('test.html');
?>

�μ�

  • rmdir() - ɾ��Ŀ¼