Re: Glob issue
| From: | Christoph Becker | Date: | Wed, 15 Jul 2015 23:35:15 +0000 |
| Subject: | Re: Glob issue | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-324988@lists.php.net to get a copy of this message | ||
The Doctor wrote:
> REcently in our php error log we have been seeing
>
> [15-Jul-2015 07:16:39 America/Edmonton] PHP Fatal error: Call to undefined function glob() in
> /var/www/docs/foreachtest.phtml on line 2
>
>
> And the foreachtest.phtml read
>
>
> <?php
> foreach (glob("*.html") as $filename) {
> echo "$filename size " . filesize($filename) . "\n";
> }
> ?>
>
>
> What is happening?
>
> Using php 5.6.11 on Apache 2.2 latest.
Are you aware of
<http://php.net/manual/en/function.glob.php#refsect1-function.glob-notes>:
| Note: This function isn't available on some systems (e.g. old Sun OS).
--
Christoph M. Becker