Server Side File Inclusion

Reply

Join Date: Jul 2005
Posts: 186
Reputation: aparnesh is an unknown quantity at this point 
Solved Threads: 10
aparnesh's Avatar
aparnesh aparnesh is offline Offline
Junior Poster

Server Side File Inclusion

 
0
  #1
Oct 14th, 2008
I have 3 files containing classes, let's say - A, B and C. B and C both contain the file A as they are subclasses of A, using the "#include file " directive. I am facing a problem if a page contains both B and C, it is saying 'Class A: name redefined'.

This is obviously happening because both B & C have copies of A, and they are clashing. Is there a way to specify to include only one copy of a file for an ASP page ? Something like the 'require_once' directive of PHP ?
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 66
Reputation: Baradaran is an unknown quantity at this point 
Solved Threads: 4
Baradaran Baradaran is offline Offline
Junior Poster in Training

Re: Server Side File Inclusion

 
0
  #2
Oct 25th, 2008
Hi,
I understood that you have 3 files, which contain some identical data. If you redefine classes, then you get an error. There is no need to have copies of classes, if you wish to include all three files. You should only have copies of the classes, when you include only one file.

Good luck!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC