Reply to RE: [PHP] FileExists?

Your name:

Reply:


Posted by Jay Blanchard on 10/20/54 11:31

[snip]
File_exists doesn't seem to work with URLs that point to another domain.
What to use?

$x = fopen(http://www.stammis.com/getstart.php);
if file_exists($x) ....
.....
????
[/snip]

What version of PHP are you using. With anything less than PHP5 you cannot
use file_exists on anything other than the file system PHP is local to.

All versions of PHP. Explicitly using file:// since PHP 4.3.0

/path/to/file.ext

relative/path/to/file.ext

fileInCwd.ext

C:/path/to/winfile.ext

C:\path\to\winfile.ext

\\smbserver\share\path\to\winfile.ext

file:///path/to/file.ext

file:// is the default wrapper used with PHP and represents the local
filesystem. When a relative path is specified (a path which does not begin
with /, \, \\, or a windows drive letter) the path provided will be applied
against the current working directory. In many cases this is the directory
in which the script resides unless it has been changed. Using the CLI sapi,
this defaults to the directory from which the script was called.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация