eqivalent to scandir for php 4

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David Callan

    eqivalent to scandir for php 4

    Hi folks,
    I'm starting to develop my final year project for college.
    Just set up dreamweaver site environment. My local machine is windows based
    running php 5 while my remote machine is unix based on php 4.something.

    I have already come across a differrence, scandir()
    it only works for php5, is there anything similar to it available for php4.
    Only new to php. Thanks for your help.


  • Andy Hassall

    #2
    Re: eqivalent to scandir for php 4

    On Sat, 18 Dec 2004 20:44:02 -0000, "David Callan" <contact@akamar keting.com>
    wrote:
    [color=blue]
    >I'm starting to develop my final year project for college.
    >Just set up dreamweaver site environment. My local machine is windows based
    >running php 5 while my remote machine is unix based on php 4.something.
    >
    >I have already come across a differrence, scandir()
    >it only works for php5, is there anything similar to it available for php4.
    >Only new to php. Thanks for your help.[/color]

    Read the manual - there is a PHP4 equivalent example on the manual page for
    scandir().

    --
    Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
    <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

    Comment

    • Dave

      #3
      Re: eqivalent to scandir for php 4

      Thanks Andy, found that just there.
      Have most hosts converted over to php5 yet do you think. PHP 5 version is a
      lot easier

      "Andy Hassall" <andy@andyh.co. uk> wrote in message
      news:iu59s0ddla po21dhld3q6lqf9 ugitklq5b@4ax.c om...[color=blue]
      > On Sat, 18 Dec 2004 20:44:02 -0000, "David Callan"[/color]
      <contact@akamar keting.com>[color=blue]
      > wrote:
      >[color=green]
      > >I'm starting to develop my final year project for college.
      > >Just set up dreamweaver site environment. My local machine is windows[/color][/color]
      based[color=blue][color=green]
      > >running php 5 while my remote machine is unix based on php 4.something.
      > >
      > >I have already come across a differrence, scandir()
      > >it only works for php5, is there anything similar to it available for[/color][/color]
      php4.[color=blue][color=green]
      > >Only new to php. Thanks for your help.[/color]
      >
      > Read the manual - there is a PHP4 equivalent example on the manual page[/color]
      for[color=blue]
      > scandir().
      >
      > --
      > Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
      > <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool[/color]


      Comment

      • Cameron

        #4
        Re: eqivalent to scandir for php 4

        Dave wrote:[color=blue]
        > Thanks Andy, found that just there.
        > Have most hosts converted over to php5 yet do you think. PHP 5 version is a
        > lot easier
        >
        > "Andy Hassall" <andy@andyh.co. uk> wrote in message
        > news:iu59s0ddla po21dhld3q6lqf9 ugitklq5b@4ax.c om...
        >[color=green]
        >>On Sat, 18 Dec 2004 20:44:02 -0000, "David Callan"[/color]
        >
        > <contact@akamar keting.com>
        >[color=green]
        >>wrote:
        >>
        >>[color=darkred]
        >>>I'm starting to develop my final year project for college.
        >>>Just set up dreamweaver site environment. My local machine is windows[/color][/color]
        >
        > based
        >[color=green][color=darkred]
        >>>running php 5 while my remote machine is unix based on php 4.something.
        >>>
        >>>I have already come across a differrence, scandir()
        >>>it only works for php5, is there anything similar to it available for[/color][/color]
        >
        > php4.
        >[color=green][color=darkred]
        >>>Only new to php. Thanks for your help.[/color]
        >>
        >> Read the manual - there is a PHP4 equivalent example on the manual page[/color]
        >
        > for
        >[color=green]
        >>scandir().
        >>
        >>--
        >>Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
        >><http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool[/color]
        >
        >
        >[/color]

        Most hosts are still using PHP 4.x.x, and PHP 5 is a lot nicer in my
        oppinion, much better OO features among other things.

        ~Cameron

        Comment

        • Thomas

          #5
          Re: eqivalent to scandir for php 4

          *Cameron wrote:
          [color=blue]
          > Dave wrote:[color=green]
          >> Thanks Andy, found that just there.
          >> Have most hosts converted over to php5 yet do you think. PHP 5 version
          >> is a
          >> lot easier[/color]
          >
          > Most hosts are still using PHP 4.x.x, and PHP 5 is a lot nicer in my
          > oppinion, much better OO features among other things.[/color]


          Well, 5.X is a lot nicer, true... but then comes MySQL 4.1.X - it is also
          a lot nicer than the previous versions.

          The problem is, its not always backward compatible, and this is especially
          the case with mysql. The hosts will not upgrade until the new versions are
          publically accepted as the new standard, with very good and understandable
          reasons.


          --
          Thomas

          SELECT date FROM wife WHERE bitching = '0' AND sex = '1'

          Comment

          • Dave

            #6
            Re: eqivalent to scandir for php 4

            Have any versions of php been withdrawn in the past?

            "Thomas" <news.thomas@no spam.netcom.no> wrote in message
            news:opsi79maa1 wq9i44@asltsvg0 02.chc.domain.. .[color=blue]
            > *Cameron wrote:
            >[color=green]
            > > Dave wrote:[color=darkred]
            > >> Thanks Andy, found that just there.
            > >> Have most hosts converted over to php5 yet do you think. PHP 5 version
            > >> is a
            > >> lot easier[/color]
            > >
            > > Most hosts are still using PHP 4.x.x, and PHP 5 is a lot nicer in my
            > > oppinion, much better OO features among other things.[/color]
            >
            >
            > Well, 5.X is a lot nicer, true... but then comes MySQL 4.1.X - it is also
            > a lot nicer than the previous versions.
            >
            > The problem is, its not always backward compatible, and this is especially
            > the case with mysql. The hosts will not upgrade until the new versions are
            > publically accepted as the new standard, with very good and understandable
            > reasons.
            >
            >
            > --
            > Thomas
            >
            > SELECT date FROM wife WHERE bitching = '0' AND sex = '1'[/color]


            Comment

            • Cameron

              #7
              Re: eqivalent to scandir for php 4

              Thomas wrote:[color=blue]
              > *Cameron wrote:
              >[color=green]
              >> Dave wrote:
              >>[color=darkred]
              >>> Thanks Andy, found that just there.
              >>> Have most hosts converted over to php5 yet do you think. PHP 5
              >>> version is a
              >>> lot easier[/color]
              >>
              >>
              >> Most hosts are still using PHP 4.x.x, and PHP 5 is a lot nicer in my
              >> oppinion, much better OO features among other things.[/color]
              >
              >
              >
              > Well, 5.X is a lot nicer, true... but then comes MySQL 4.1.X - it is
              > also a lot nicer than the previous versions.
              >
              > The problem is, its not always backward compatible, and this is
              > especially the case with mysql. The hosts will not upgrade until the
              > new versions are publically accepted as the new standard, with very
              > good and understandable reasons.
              >
              >[/color]

              Very true, maybe some will start to offer the possibility of PHP5 while
              still allowing PHP4, would be the best way to phase it in really.
              I'm cutting right through anyways, just need a bit more hardware and a
              UPS then I will have my own server...mmmm

              ~Cameron

              Comment

              • Tommy Gildseth

                #8
                Re: eqivalent to scandir for php 4

                David Callan wrote:
                [color=blue]
                > Hi folks,
                > I'm starting to develop my final year project for college.
                > Just set up dreamweaver site environment. My local machine is windows
                > based running php 5 while my remote machine is unix based on php
                > 4.something.
                >
                > I have already come across a differrence, scandir()
                > it only works for php5, is there anything similar to it available for
                > php4. Only new to php. Thanks for your help.[/color]

                glob() should be able to do the job just as well.
                Instead of
                scandir('path/to/folder/');
                you'll write
                glob('path/to/folder/*');

                There are off course a few other diferences too. I suggest you have a look
                at http://www.php.net/glob

                --
                Tommy

                Comment

                Working...