ballhogjoni Posted July 1, 2007 Share Posted July 1, 2007 This is some code I have foreach (glob("*.php") as $filename) { if (in_array($filename,$noshow)) { continue; } and I am wondering if I could tell the foreach array to look at a specific directory. Ex: foreach (glob("http://xxx/*.php") as $filename) { if (in_array($filename,$noshow)) { continue; } Quote Link to comment Share on other sites More sharing options...
trq Posted July 1, 2007 Share Posted July 1, 2007 I am wondering if I could tell the foreach array to look at a specific directory. Yes. However your example is a url, not a filepath. foreach (glob("/etc/*rc") as $filename) { Will work for instance, but a url will not. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.