#1
  1. No Profile Picture
    tmak
    Guest
    Devshed Newbie (0 - 499 posts)
    I'm new to PHP so please exscuse me if
    this topic has gone round n round.

    I am wondering if there is any way of
    finding out if a file has been previously
    required(). For example, require() some class
    source code in two other class source code
    files.

    I thought of using some time of __FILE__
    but I don't think this is correct.

    Thanks for any help in advance,
    mAk
  2. #2
  3. No Profile Picture
    cbolt
    Guest
    Devshed Newbie (0 - 499 posts)
    I had the same problem... my solution was to set a variable at the end of the included or required file, and check if the variable is set before re-requiring it.

Similar Threads

  1. Codepupil
    By Adachic in forum C Programming
    Replies: 3
    Last Post: February 6th, 2004, 07:50 PM
  2. Replies: 3
    Last Post: January 31st, 2004, 01:16 AM
  3. DBI warnings -- plz help
    By pranesh in forum Perl Programming
    Replies: 4
    Last Post: December 1st, 2003, 07:52 PM
  4. w3c strict errors (10), css, and js questions
    By WorldBuilder in forum CSS Help
    Replies: 12
    Last Post: November 6th, 2003, 05:48 AM
  5. compile vhosts
    By the-griff in forum Linux Help
    Replies: 0
    Last Post: November 5th, 2003, 09:07 PM

IMN logo majestic logo threadwatch logo seochat tools logo