Skip navigation
Currently Being Moderated

Path to includes are not resolving when define is used

Jun 21, 2012 11:45 AM

Tags: #not #php #dreamweaver #path #defined #define #hints #include #require #code_hints #resolving

in a Php document path to a class specified with a string resolved without a problem:

require_once ( './classes/class.php' );

 

However, if a defined variable is used, the path does not resolve and Dreamweaver doesn't help with method hints:

define ( CLASS_DIR . './classes/' );

require_once ( CLASS_DIR . 'class.php' );

 

As a note,  CLASS_DIR might not be defined in the same document, bu linked from another one that contains the define:

 

require_once ( './config.php' ); //contains  define ( CLASS_DIR . './classes/' );

 

 

As I use defined paths, I can take no advantage of Dreamweaver's hints.

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points