1. Trang chủ
  2. » Công Nghệ Thông Tin

PHP Developer''''s Dictionary- P73 potx

5 276 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 5
Dung lượng 404,9 KB

Nội dung

PHP Developer’s Dictionary IT-SC book 360 Description The set_file_buffer() function sets the buffering for write operations to the file referenced by fp to buffer bytes. If the buffer parameter is 0, write operations are unbuffered. is_dir() Syntax bool is_dir(string filename); Description The is_dir() function returns true, 1 , if filename exists and is a directory. Note The results of this function are cached by PHP. Any subsequent calls to is_dir() will return the same results even if the environment has changed. The cache is cleared through the clearstatcache() function. is_executable() Syntax bool is_executable(string filename); Description The is_executable() function returns true, 1 , if the filename exists and is executable. On UNIX systems, this will also return true, 1 , if a directory has the execute permission set. Note The results of this function are cached by PHP. Any subsequent calls to is_executable() will return the same results even if the environment has changed. The cache is cleared through the clearstatcache() function. PHP Developer’s Dictionary IT-SC book 361 is_file() Syntax bool is_file(string filename ); Description The is_file() function returns true, 1 , if the filename exists and is a file. Note The results of this function are cached by PHP. Any subsequent calls to is_file() will return the same results even if the environment has changed. The cache is cleared through the clearstatcache() function. is_link() Syntax bool is_link(string filename); Description The is_link() function returns true, 1 , if the filename exists and is a symbolic link. Note The results of this function are cached by PHP. Any subsequent calls to is_link() will return the same results even if the environment has changed. The cache is cleared through the clearstatcache() function. is_readable() Syntax PHP Developer’s Dictionary IT-SC book 362 bool is_readable(string filename); Description The is_readable() function returns true, 1, if the filename exists and is readable. On UNIX systems, this will also return true, 1, if a directory has the read permission set. On Windows, this function always returns true, 1 . Note The results of this function are cached by PHP. Any subsequent calls to is_executable() will return the same results even if the environment has changed. The cache is cleared through the clearstatcache() function. is_writeable() Syntax bool is_writeable(string filename); Description The is_writeable() function returns true, 1 , if the filename exists and is writeable. On UNIX systems, this will also return true, 1 , if a directory has the write permission set. Note The results of this function are cached by PHP. Any subsequent calls to is_writeable() will return the same results even if the environment has changed. The cache is cleared through the clearstatcache() function. link() Syntax int link(string target, string link); PHP Developer’s Dictionary IT-SC book 363 Description The link() function creates a hard link from target to link . This function does nothing on Windows. linkinfo() Syntax int linkinfo(string path); Description The linkinfo() function verifies the existence of the link referenced by path . This function returns true, 1 , if the link exists. mkdir() Syntax int mkdir(string pathname, int mode); Description The mkdir() function creates the directory specified by pathname . The mode parameter specifies the permission on the directory and should be in octal format (see Table 9.7 ). For example, all permissions for the user, read and execute for the group, and read and execute for the world would be represented by 0755 . Table 9.7. Valid Modes on a UNIX System Mode Permission 0 No permissions 1 Execute 2 Write 3 Write and execute 4 Read 5 Read and execute 6 Read and write 7 Read, write, and execute Note The mode argument is ignored on a Windows system. PHP Developer’s Dictionary IT-SC book 364 pclose() Syntax int pclose(int fp ); Description The pclose() function closes the file pointer, fp , to a pipe opened by popen() . This function returns the termination status of the process that was run through the popen() function. popen() Syntax int popen(string command, string mode); Description The popen() function forks the process defined by command and opens a pipe to the output. The mode parameter can be either r or w and the function returns a file pointer that is placed at the beginning of the piped output. This function returns false, 0 , if an error is returned. readfile() Syntax int readfile(string filename, int [use_include_path]); Description The readfile() function reads an entire file defined by filename and writes it to standard out, which is usually the browser. This function returns the number of bytes read. False is returned if an error occurs. If filename begins with "http://" or "ftp://" , a connection is opened to the appropriate server and the text of the response is written to standard output. . cached by PHP. Any subsequent calls to is_executable() will return the same results even if the environment has changed. The cache is cleared through the clearstatcache() function. PHP Developer’s. true, 1 , if filename exists and is a directory. Note The results of this function are cached by PHP. Any subsequent calls to is_dir() will return the same results even if the environment has. PHP Developer’s Dictionary IT-SC book 360 Description The set_file_buffer() function sets

Ngày đăng: 07/07/2014, 05:20