Keep your PHP and WordPress seperate, using the shortcode [php-to-page] you can include PHP files in your pages.
This plugin is perfect for those who use WordPress as a CMS.
This section describes how to install the plugin and get it working.
- Upload 'php-to-pages' to the '/wp-content/plugins/' directory
- Activate the plugin through the 'Plugins' menu in WordPress
- Place [php-to-page] in your page to display PHP, eg. [php-to-page file=/path/to/you/include/file.php]