Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Programming Q&A
PHP - Search Through Files
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Weasel" data-source="post: 417557" data-attributes="member: 9520"><p>[PHP]$files = glob("../".$where."/*". $text ."*.*");[/PHP]</p><p>contains unneeded checks.</p><p>[PHP]$files = glob("../".$where."/*". $text ."*");[/PHP]</p><p>is enough.</p><p></p><p>However, for debugging purposes, please add the GLOB_NOCHECK flag like so:</p><p>[PHP]$files = glob("../".$where."/*". $text ."*", GLOB_NOCHECK);[/PHP]</p><p></p><p>and instead of</p><p>[PHP]die('No files found.');[/PHP]</p><p>do</p><p>[PHP]</p><p>var_dump($files);</p><p>exit;</p><p>[/PHP]</p><p></p><p>and post the results.</p></blockquote><p></p>
[QUOTE="Weasel, post: 417557, member: 9520"] [PHP]$files = glob("../".$where."/*". $text ."*.*");[/PHP] contains unneeded checks. [PHP]$files = glob("../".$where."/*". $text ."*");[/PHP] is enough. However, for debugging purposes, please add the GLOB_NOCHECK flag like so: [PHP]$files = glob("../".$where."/*". $text ."*", GLOB_NOCHECK);[/PHP] and instead of [PHP]die('No files found.');[/PHP] do [PHP] var_dump($files); exit; [/PHP] and post the results. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
PHP - Search Through Files
Top