1

““Eregi”在 php5.6 中为此照片库模块工作:http ://taraskrysa.com/pages/media/photo_gallery.php

但是,php7.2 中的 preg_match 不适用于同一个图库模块。我目前在下面的页面链接上将 eregi 更改为 preg_match,但没有从分配给画廊的文件夹中提取图像,也没有出现错误:http: //www.carefreeseniors.com/pages/gallery/birthdays.php

我已在 view.php 文件中将 eregi 更改为 preg_match

// Read the picture directory:

while (($filename = readdir($d)) !== false) {

    if ($filename == $thumbdir || ($filename == '..' && $dirname == '') || ($filename != '..' && substr($filename, 0, 1) == '.')) {

        continue;

    }

    $file = $realdir . $delim . $filename;

    if (is_dir($file)) {

        $dirs[] = $filename;

    } elseif (preg_match($query, $file)) { 

        $pics[] = $filename;

    }

}

我希望将 eregi 更改为 preg_match 可以解决问题并将照片拉入画廊。但是,它不起作用,并且该站点的所有画廊现在都没有出现。任何帮助,将不胜感激。

如果它有助于快速解决这个问题,我很乐意提供整个模块。

4

0 回答 0