On Wed, 20 Nov 2002, JohnMeyer wrote:

> Does unlink work with wildcards e.g unlink("somefile*.*");

No.

unlink() is a thin veneer on the system unlink() call.

Wildcard expansion like you have it is done by a shell glob function. You
would need to replicate what the shell does - use it as a regular
expression in an opendir()/readdir()/delete file on regexp
match/closedir() set of operations.

Or, preferably, look up the glob() function in PHP and use the return 
values in an unlink() call. Much better than spawning a shell process  
;^)

--
"... but while you're marching in the rain, doesn't the *bell* on the sax
fill with water?" - jerry
"Yes, Jerry ... the bell would fill with water. (un)Fortunately, this does
not affect the way a sax sounds." - Fred (postings on the Clarinet BBoard)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to