Include issue
Posted: Mon Jul 19, 2010 11:20 pm
OK. I'm trying to include a file but having difficulties. Here's a little about what I'm writing...
File: ads.php
Description: defines a class which performs operations on sets of ads within a sql database.
Includes: ad.php
File: ad.php
Description: defines a class which contains information on a single ad and methods to manipulate that ad.
File: ad-manager.php
Description: creates a user interface to load up sets of ads and display their information in a table.
Includes: ad.php and ads.php
Here's the problem. I can only include ad.php once. Now manager.php (or ads.php depending on which one includes it) cannot find the definition of the ad class. I cannot seem to find a way around this or why php is behaving as such.
File: ads.php
Description: defines a class which performs operations on sets of ads within a sql database.
Includes: ad.php
File: ad.php
Description: defines a class which contains information on a single ad and methods to manipulate that ad.
File: ad-manager.php
Description: creates a user interface to load up sets of ads and display their information in a table.
Includes: ad.php and ads.php
Here's the problem. I can only include ad.php once. Now manager.php (or ads.php depending on which one includes it) cannot find the definition of the ad class. I cannot seem to find a way around this or why php is behaving as such.