Monday, 26 August 2013

PHP: php can't find a class defined in an include() script

PHP: php can't find a class defined in an include() script

I am trying to use Michelf's PHP implementation of Markdown.
I'm including his Markdown.php script ith include() at the beginning of my
main script, but when trying to use the class (be it for creating a new
object or using a method directly), I get this:
Fatal error: Class 'Markdown' not found in [my main script]
The class Markdown is cleary defined in included Markdown.php however.
I've checked, of course, that the include works. I've tried placing
Markdown.php in both my include_path and my main script's path, it doesn't
change anything.
I am at a loss.

No comments:

Post a Comment