Results 1 to 15 of 165

Thread: Вопросы по работе PHP на роутере

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #15
    Quote Originally Posted by vitalerm View Post
    В функции glob директива GLOB_BRACE никак не срабатывает -
    то есть скрипт ниже выводит только список файлов "без директивы =".


    <?php
    $d='/opt/share/www/sites/forum/images/avatars/';

    $files = glob($d.'{*.jpg,*.png}', GLOB_BRACE);

    foreach ($files as $file) { echo " с директивой = ", $file; }


    foreach (array_merge(glob($d.'*.jpg'),glob($d.'*.png')) as $filename) {
    echo " без директивы = $filename \n"; }

    ?>


    (Убираешь фигурные скобки и строка $files = glob($d.'*.jpg', GLOB_BRACE); работает).

    echo defined('GLOB_BRACE'); - выдает 1.


    Стоит на Аsus WL500gp1
    1.9.2.7-rtn-r4001
    и свежие php 5.3.10 и lightppd из нового репозитария.
    а так ?
    Code:
    перемудрил:удалено
    Last edited by BaltazoR; 05-04-2012 at 13:57.

Similar Threads

  1. How to execute php scripts ?
    By simistef in forum WL-500gP Q&A
    Replies: 13
    Last Post: 11-03-2008, 09:35

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •