C# 클래스 PHP.Core.PhpStream

Abstraction of streaming behavior for PHP. PhpStreams are opened by StreamWrappers on a call to fopen().
상속: PHP.Core.PhpResource
파일 보기 프로젝트 열기: jadu/Phalanger 1 사용 예제들

공개 메소드들

메소드 설명
CanReadWithoutLock ( ) : bool
CanWriteWithoutLock ( ) : bool
CheckAccess ( string filename, CheckAccessMode mode, CheckAccessOptions options ) : bool

Performs all checks on a path passed to a PHP function.

This method performs a check similar to safe_mode.c: php_checkuid_ex() together with open_basedir check.

The filename may be one of the following: A relative path. The path is resolved regarding the include_path too if required and checking continues as in the next case. An absolute path. The file or directory is checked for existence and for access permissions1 according to the given mode. 1 Regarding the open_basedir configuration option. File access permissions are checked at the time of file manipulation (opening, copying etc.).

ResolvePath ( string &path, StreamWrapper &wrapper, CheckAccessMode mode, CheckAccessOptions options ) : bool

Merges the path with the current working directory to get a canonicalized absolute pathname representing the same file.

This method is an analogy of main/safe_mode.c: php_checkuid. Looks for the file in the include_path and checks for open_basedir restrictions.

Stat ( ) : PHP.Core.StatStruct

비공개 메소드들

메소드 설명
CheckIncludePath ( string relativePath, string &absolutePath ) : bool

Check if the path lays inside of the directory tree specified by the open_basedir configuration option and return the resulting absolutePath.

메소드 상세

CanReadWithoutLock() 공개 메소드

public CanReadWithoutLock ( ) : bool
리턴 bool

CanWriteWithoutLock() 공개 메소드

public CanWriteWithoutLock ( ) : bool
리턴 bool

CheckAccess() 공개 정적인 메소드

Performs all checks on a path passed to a PHP function.

This method performs a check similar to safe_mode.c: php_checkuid_ex() together with open_basedir check.

The filename may be one of the following: A relative path. The path is resolved regarding the include_path too if required and checking continues as in the next case. An absolute path. The file or directory is checked for existence and for access permissions1 according to the given mode. 1 Regarding the open_basedir configuration option. File access permissions are checked at the time of file manipulation (opening, copying etc.).

If the file can not be accessed /// and the is not set.
public static CheckAccess ( string filename, CheckAccessMode mode, CheckAccessOptions options ) : bool
filename string A resolved path. Must be an absolute path to a local file.
mode CheckAccessMode One of the .
options CheckAccessOptions true to suppress error messages.
리턴 bool

ResolvePath() 공개 정적인 메소드

Merges the path with the current working directory to get a canonicalized absolute pathname representing the same file.
This method is an analogy of main/safe_mode.c: php_checkuid. Looks for the file in the include_path and checks for open_basedir restrictions.
Security violation - when the target file /// lays outside the tree defined by open_basedir configuration option.
public static ResolvePath ( string &path, StreamWrapper &wrapper, CheckAccessMode mode, CheckAccessOptions options ) : bool
path string An absolute or relative path to a file.
wrapper StreamWrapper The wrapper found for the specified file or null if the path resolution fails.
mode CheckAccessMode The checking mode of the method (file, directory etc.).
options CheckAccessOptions Additional options for the method.
리턴 bool

Stat() 공개 메소드

public Stat ( ) : PHP.Core.StatStruct
리턴 PHP.Core.StatStruct