Copy files and folders

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

    #1

    Copy files and folders

    Assuming you had a template folder and files on the webspace and you
    wanted to make a exact copy/rename of it with a username and password
    being the one and only difference - how would one do it ? .

    (the difference being a password protected folder)


    BTW: I have the flu with the full cold shivers and headaches routine and
    i'm hoping some bastard trys to point me to php.net .
  • juglesh

    #2
    Re: Copy files and folders


    SOR wrote:[color=blue]
    > Assuming you had a template folder and files on the webspace and you
    > wanted to make a exact copy/rename of it with a username and password
    > being the one and only difference - how would one do it ? .
    >
    > (the difference being a password protected folder)
    >
    >
    > BTW: I have the flu with the full cold shivers and headaches routine and
    > i'm hoping some bastard trys to point me to php.net .[/color]



    hth!

    Comment

    • SOR

      #3
      Re: Copy files and folders

      <comp.lang.ph p , juglesh , jugleshjunk@hot mail.com>
      <1122660285.210 894.10070@f14g2 000cwb.googlegr oups.com>
      <29 Jul 2005 11:04:45 -0700>
      [color=blue]
      > http://us3.php.net/copy
      >[/color]

      Excellent link .

      I find it strange php is 10 years old but doesnt have a straight forward
      command to copy a folder and its contents .

      webpage('blah.p hp') would no doubt save many lost man hours and the
      headers already started error message would be myth .

      What else doesnt php have ? .

      Comment

      • Carl

        #4
        Re: Copy files and folders

        SOR wrote:[color=blue]
        >
        > Excellent link .
        >
        > I find it strange php is 10 years old but doesnt have a straight forward
        > command to copy a folder and its contents .[/color]

        SOR,

        This would have been redundant in my opinion. Open the directory, read
        all the files in the directory and copy them to wherever you want. Add
        this routine to a neat little function or class, and there you are,
        you've created the copy directory command that php is so sorely lacking.
        You should only need to write it once. It may even prove to be a
        valuable learning experience.

        You can then release it on sourceforge and have provided a contribution
        to php programmers everywhere. Or you can just continue to use windows
        explorer to copy folders and their contents.
        [color=blue]
        >
        > webpage('blah.p hp') would no doubt save many lost man hours and the
        > headers already started error message would be myth .[/color]

        This is considerably easier to implement yourself than the first
        example. Besides, how many hours did you really waste before actually
        taking the time to read the documentation for the header function, which
        clearly states what causes this error and ways to get around it.
        [color=blue]
        >
        > What else doesnt php have ? .[/color]

        PHP doesn't make your coffee or tie your shoes.
        PHP is a programming language which allows YOU to write programs.

        Carl.

        Comment

        • SOR

          #5
          Re: Copy files and folders

          <comp.lang.ph p , Carl , _Nospam_@_DO_NO T_.USE>
          <y3vGe.1838$iM7 .321@newssvr21. news.prodigy.co m>
          <Fri, 29 Jul 2005 19:02:54 GMT>
          [color=blue][color=green]
          > > webpage('blah.p hp') would no doubt save many lost man hours and the
          > > headers already started error message would be myth .[/color]
          >
          > This is considerably easier to implement yourself than the first
          > example. Besides, how many hours did you really waste before actually
          > taking the time to read the documentation for the header function, which
          > clearly states what causes this error and ways to get around it.
          >[/color]

          You say 'ways to get around it' like thats a good thing .

          Comment

          • Carl

            #6
            Re: Copy files and folders

            SOR wrote:[color=blue]
            > <comp.lang.ph p , Carl , _Nospam_@_DO_NO T_.USE>
            > <y3vGe.1838$iM7 .321@newssvr21. news.prodigy.co m>
            > <Fri, 29 Jul 2005 19:02:54 GMT>
            >[color=green][color=darkred]
            >>>webpage('bla h.php') would no doubt save many lost man hours and the
            >>>headers already started error message would be myth .[/color]
            >>
            >>This is considerably easier to implement yourself than the first
            >>example. Besides, how many hours did you really waste before actually
            >>taking the time to read the documentation for the header function, which
            >>clearly states what causes this error and ways to get around it.
            >>[/color]
            >
            >
            > You say 'ways to get around it' like thats a good thing .[/color]

            SOR,

            I think it _is_ a Good Thing that they would include examples of how to
            avoid common mistakes, Why would you suggest it isn't?

            Carl.

            Comment

            Working...