For any of these methods, you go through the standard process of using fopen to open the file, a function to read the data, then fclose to close the file, as shown in Listing 1.
对于这些方法中的任何一种,通过使用fopen(用于读取数据的函数)的标准方法打开文件,然后使用fclose关闭文件,如清单1所示。
Note: the "r" used in fopen indicates that the file is open for reading only.
注:fopen中使用的“r ”将指示文件以只读方式打开。
This function is a high-level way of opening a file; but, since the only way to open a file in Linux is to use the open system call, fopen makes use of open in its implementation.
该函数是打开文件的高层次方式;但是,因为在Linux中打开文件的唯一方法是使用open系统调用,所以fopen在其实现中利用open 。
As with fopen, file_get_contents, file, and readfile, all return False on failure to open or process the file.
如fopen函数一样,file_get _ contents、file和readfile函数都在打开失败或处理文件失败时返回False。
As with fopen, file_get_contents, file, and readfile, all return False on failure to open or process the file.
如fopen函数一样,file_get _ contents、file和readfile函数都在打开失败或处理文件失败时返回False。
应用推荐