• ? streamWrapper::stream_write
  • streamWrapper::url_stat ?
  • ����ѧԺ www.cainiaoplay.com
  • PHP Manual
  • streamWrapper
  • Delete a file

streamWrapper::unlink

(PHP 5, PHP 7)

streamWrapper::unlink — Delete a file

˵��

public streamWrapper::unlink ( string $path ) : bool

This method is called in response to unlink().

Note:

In order for the appropriate error message to be returned this method should not be defined if the wrapper does not support removing files.

����

path

The file URL which should be deleted.

����ֵ

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

�����쳣

���ô˷���ʧ�ܽ����� E_WARNING��δʵ�֣���

ע��

Note:

���Ϸ��������Ĵ��ݸ����ú���ʱ������ streamWrapper::$context �ᱻ�ı䡣

�μ�

  • unlink() - ɾ���ļ�
  • streamWrapper::rmdir() - Removes a directory