任何人都有更好的file_exists()? [英] Anyone Have A Better file_exists() ?

查看:77
本文介绍了任何人都有更好的file_exists()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

{注意:我有RH9 Linux的PHP 4.2.2。}


任何人都有更好的file_exists()吗?即使你使用'命令'技巧在Linux上使用shell

,但我有兴趣

看看你想出了什么。


我在Linux上有这个远程安装的SMB共享,​​卡在我/ mnt

目录中,文档告诉我file_exists()不能用于

那个。当我测试这个时,我发现这是真的。因此,我需要

替代。

解决方案

2004年7月27日13:25:24 -0700 go********@hotpop.com (Google Mike)写道:

{注意:我有RH9 Linux的PHP 4.2.2。

任何人都有更好的file_exists()吗?即使你使用命令技巧在Linux上使用shell搞砸了技巧,我也有兴趣看看你想出了什么。

我远程拥有这个在Linux上安装SMB共享,​​卡在我的/ mnt
目录中,文档告诉我file_exists()不能用于
。当我测试这个时,我发现这是真的。因此,我需要一个替代方案。




似乎:

test -e< file> ;;回声


?工作正常...


我想你可以做类似的事情:


<?php


//要检查的文件数组。


file = array(


{NOTE: I have PHP 4.2.2 for RH9 Linux.}

Anyone have a better file_exists() out there? Even if you use shell
out tricks with Linux using the `command` trick, I''d be interested to
see what you came up with.

I have this remotely mounted SMB shares on Linux, stuck in my /mnt
directory, and the docs tell me that file_exists() doesn''t work on
that. When I tested this, I found this to be true. Therefore, I need
an alternative.

解决方案

On 27 Jul 2004 13:25:24 -0700
go********@hotpop.com (Google Mike) wrote:

{NOTE: I have PHP 4.2.2 for RH9 Linux.}

Anyone have a better file_exists() out there? Even if you use shell
out tricks with Linux using the `command` trick, I''d be interested to
see what you came up with.

I have this remotely mounted SMB shares on Linux, stuck in my /mnt
directory, and the docs tell me that file_exists() doesn''t work on
that. When I tested this, I found this to be true. Therefore, I need
an alternative.



It seems that:
test -e <file>; echo


? works fine...

I guess you could do something like:

<?php

// Array of files to check.


file = array(


这篇关于任何人都有更好的file_exists()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆