[linux] php - LAN searching
lucka na frru.utcru.sk
lucka na frru.utcru.sk
Sobota Červen 7 15:48:53 CEST 2003
zdravim,
mozno sa pytam ohladne php na nespravnom mieste, ale spytam sa predsa,
pretoze si uz neviem rady (ak je tato otazka na linux mailing liste nie na
pravom mieste tak ma ospravedlnte).
chcel by som spravit cez php vyhladavanie suborov na sieti v zdielanych
priecinkoch cez substringy avsak neviem najst nato funkciu.
v php manuale som nasiel nieco take:
file_exists
(PHP 3, PHP 4 )
file_exists -- Checks whether a file or directory exists
Description
bool file_exists ( string filename)
Returns TRUE if the file or directory specified by filename exists; FALSE
otherwise.
Using Windows shares: On windows, use //computername/share/filename or
\\computername\share\filename to check files on network shares.
Example 1. Testing whether a file exists
<?php
$filename = '/path/to/foo.txt';
if (file_exists($filename)) {
print "The file $filename exists";
} else {
print "The file $filename does not exist";
}
?>
avsak toto checkovanie ci subor existuje sa mi zda ze bude ficat len na
php beziacom na win-serveri, ak to tak nie je tak ma prosim opravte.
pripadne ak tato funkcia funguje aj na lin-server, tak asi so zmenenym
syntaxom cesty (\\computername\share\filename) ... mozte mi pomoct akym?
kazdu radu privitam ... dik moc .... lucox
Další informace o konferenci linux