You are here: Re: file_exists() with Windows share « PHP Programming Language « IT news, forums, messages
Re: file_exists() with Windows share

Posted by Steve on 11/28/05 18:42

> Running PHP5 with IIS on a Win2K Server

You can get the same problem with PHP 4.x, but for different reasons.

> whenever I try file_exists() on a file in a windows share on another
> server I get a response of False - I can't open the file or do anything
> with it. I'm sure the filename/path is Ok

For PHP 4.x, all file operations assume the local file system
(effectively, "file://" is prepended to the given filename before
operating on it.) The workaround is to use drive letters instead.

For PHP 5.x, you can work with UNC shares BUT there are caveats: (1)
from the manual "...this function returns FALSE for files inaccessible
due to safe mode restrictions." and (2), note this comment about
running under domain accounts:
<http://aspn.activestate.com/ASPN/Mail/Message/phpdoc/1183917> Check
permissions for the folder and file are appropriate for the web server
account.

---
Steve

 

Navigation:

[Reply to this 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

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