PHP Gallery not working in Wordpress

I am replacing an existing Dreamweaver site at the same URL with a new site based on WordPress. The old site has a PHP driven photo gallery that I want to include in the new site.

I have the photo gallery installed in the main route of the site. I’ve installed WordPress to a folder within www called “WordPress” with the WordPress index file within that folder. I will move the index and .htaccess files to the WWW folder when the site is ready to go live.

The problem is that I am trying to get the existing photo galleries installed on the new WordPress pages and I am getting errors. I have tried various path options in the PHP and keep getting errors.

The PHP - which works on the Dreamweaver version of the site is: [php]<?php $cat='3';include('photogallery/mainpage.php')?> [/php]

With this code in the WordPress page I get the following error messages:

Warning: include(photogallery/mainpage.php) [function.include]: failed to open stream: No such file or directory in /home/atmosphe/public_html/wordpress/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 1
Warning: include(photogallery/mainpage.php) [function.include]: failed to open stream: No such file or directory in /home/atmosphe/public_html/wordpress/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 1
Warning: include() [function.include]: Failed opening ‘photogallery/mainpage.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/atmosphe/public_html/wordpress/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 1

My other concern is what will happen when I move the index file to take the site live. Will the PHP need any further tweaking then?
I really hope someone can help,
Thanks
John

Sponsor our Newsletter | Privacy Policy | Terms of Service