Loading ...
Sorry, an error occurred while loading the content.

session problem when DirectoryIterator class uses

Expand Messages
  • Anees
    hi in PHP 5 there is a built in class called DirectoryIterator, which will help to list all directories and files in a particular directory. but when i used
    Message 1 of 3 , Dec 1, 2006
    • 0 Attachment
      hi

      in PHP 5 there is a built in class called DirectoryIterator, which will help to list all directories and files in a particular directory.

      but when i used this, i couldnt get the session variables in the page.
      i couldnt even use session_start() at the begining ..

      if anybody experienced the same or knows the soln
      plz hlp
      Thanks in Advance


      Love
      Anees Muhammed
      ___________


      ---------------------------------
      Any questions? Get answers on any topic at Yahoo! Answers. Try it now.

      [Non-text portions of this message have been removed]
    • David Stockton
      It s extremely unlikely that just using the DirectoryIterator would cause session_start to not work. More likely there is some sort of output occurring before
      Message 2 of 3 , Dec 1, 2006
      • 0 Attachment
        It's extremely unlikely that just using the DirectoryIterator would cause
        session_start to not work. More likely there is some sort of output
        occurring before you call the session_start method. Are you getting an
        error? If so, posting it would probably help. It likely says something
        like "headers could not be sent. output started on line 23".

        Another possibility is that you've got white space or something before the
        opening <?php tag.

        David

        On 12/1/06, Anees <anees_muhd@...> wrote:
        >
        > hi
        >
        > in PHP 5 there is a built in class called DirectoryIterator, which will
        > help to list all directories and files in a particular directory.
        >
        > but when i used this, i couldnt get the session variables in the page.
        > i couldnt even use session_start() at the begining ..
        >
        > if anybody experienced the same or knows the soln
        > plz hlp
        > Thanks in Advance
        >
        > Love
        > Anees Muhammed
        > ___________
        >
        > ---------------------------------
        > Any questions? Get answers on any topic at Yahoo! Answers. Try it now.
        >
        > [Non-text portions of this message have been removed]
        >
        >
        >
        > --
        > This message has been scanned for viruses and
        > dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
        > believed to be clean.


        [Non-text portions of this message have been removed]
      • Anees
        hi David Thanks to hear me and it came ok tooo actually i given session_start(); then error_reporting(0); and when i changes this to error_reporting(0); then
        Message 3 of 3 , Dec 2, 2006
        • 0 Attachment
          hi David
          Thanks to hear me

          and
          it came ok tooo

          actually i given

          session_start(); then
          error_reporting(0);

          and when i changes this to

          error_reporting(0); then
          session_start();

          now its working well. i thought it was the problem with the class

          Thank u .


          and
          is there any keywords that we shouldnt give as session variable?


          David Stockton <php@...> wrote: It's extremely unlikely that just using the DirectoryIterator would cause
          session_start to not work. More likely there is some sort of output
          occurring before you call the session_start method. Are you getting an
          error? If so, posting it would probably help. It likely says something
          like "headers could not be sent. output started on line 23".

          Another possibility is that you've got white space or something before the
          opening <?php tag.

          David

          On 12/1/06, Anees <anees_muhd@...> wrote:
          >
          > hi
          >
          > in PHP 5 there is a built in class called DirectoryIterator, which will
          > help to list all directories and files in a particular directory.
          >
          > but when i used this, i couldnt get the session variables in the page.
          > i couldnt even use session_start() at the begining ..
          >
          > if anybody experienced the same or knows the soln
          > plz hlp
          > Thanks in Advance
          >
          > Love
          > Anees Muhammed
          > ___________
          >
          > ---------------------------------
          > Any questions? Get answers on any topic at Yahoo! Answers. Try it now.
          >
          > [Non-text portions of this message have been removed]
          >
          >
          >
          > --
          > This message has been scanned for viruses and
          > dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
          > believed to be clean.

          [Non-text portions of this message have been removed]






          Love
          Anees Muhammed
          ___________


          ---------------------------------
          Have a burning question? Go to Yahoo! Answers and get answers from real people who know.

          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.