Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2010
    Location
    Syracuse, NY
    Posts
    2,159
    Plugin Contributions
    17

    Default PHP glob() Function

    Any reason why not to use this function?
    Website - Github. Like the ZCA Bootstrap 4 Template? Donations Welcome. Bootstrap Plugins?

  2. #2
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: PHP glob() Function

    Last time I researched iterating over files in a directory I seem to remember coming across something about it not scaling as well as some of the other methods.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  3. #3
    Join Date
    Feb 2010
    Location
    Syracuse, NY
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: PHP glob() Function

    Quote Originally Posted by lhungil View Post
    Last time I researched iterating over files in a directory I seem to remember coming across something about it not scaling as well as some of the other methods.
    I agree, it isn't or doesn't allow the flexibility that other methods offer.

    I am currently using it to return additional images and it is working very well and returns all images and all extensions of the base image name no matter the directory or sub-directory.

    Guess I was just wondering if their was a reason it hasn't been used in the Zen Cart Code other than it's flexibility.
    Website - Github. Like the ZCA Bootstrap 4 Template? Donations Welcome. Bootstrap Plugins?

  4. #4
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: PHP glob() Function

    Quote Originally Posted by rbarbour View Post
    I agree, it isn't or doesn't allow the flexibility that other methods offer.

    I am currently using it to return additional images and it is working very well and returns all images and all extensions of the base image name no matter the directory or sub-directory.

    Guess I was just wondering if their was a reason it hasn't been used in the Zen Cart Code other than it's flexibility.
    It has some performance impacts when run against folders with a large number of files.

    The better scaling GlobIterator is not available until PHP >= 5.3.0
    Last edited by lhungil; 19 Dec 2013 at 06:04 PM.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

 

 

Similar Threads

  1. v154 PHP "list" function interface change for PHP 7.0
    By lat9 in forum General Questions
    Replies: 3
    Last Post: 14 Jan 2016, 05:20 PM
  2. Replies: 3
    Last Post: 18 Nov 2014, 09:34 PM
  3. Installing on Glob@t
    By PBurman in forum Installing on a Linux/Unix Server
    Replies: 7
    Last Post: 14 Dec 2009, 08:05 PM
  4. PHP Eval Function
    By Farrukh in forum General Questions
    Replies: 1
    Last Post: 22 Jun 2006, 11:34 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR