Include and use PHP class into a wordpress page
I have a class in PHP named sample.class.php which I want to include in a wordpress page to exploit its functions. I am using the template twentytwelve and I have installed the plugin exec PHP to write php code into wp pages. I tried to do this until now with bad results:
– I’ve created a folder called “includes” into this path wordpress/wp-content/twentytwelve and then:
– I’ve tried to do this in a wordpress page (but doesn’t work)
and its error is the following:
Parse error: syntax error, unexpected ‘<’ in /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 11
…and also this:
Anything works here. Can you explain me what I have to do in order to solve this mistake?
Thank you in advance.
- The topic ‘Include and use PHP class into a wordpress page’ is closed to new replies.