Help with PHP within HTML

Hello everyone,

I need some help running a PHP script within an HTML document (index.html)

Important Information:

This is what I'm using: FormCraft: Premium PHP Form Builder from CodeCanyon.net
My website is an HTML 5 template purchased from Themeforest.net.

Now, the issue is that when I try to place a form within my page it doesnt show up (blank space) and everything after the php code is blank (in the browser). Here is the PHP that was inserted:

<?php
require_once(’…/formcraft/function.php’);
formcraft(1);
?>

Also, the text at the forefront of my parallax background is missing.

I tried adding this to my .htaccess file (taken from my host’s php wiki) in order to treat all pages as php:


AddHandler fcgid-script .html
FCGIWrapper “/dh/cgi-system/php53.cgi” .html

The permissions of all important folders is set to 755. All folder paths are correct.

I’ve contacted the author of the script but he isn’t being very helpful. So! Any help with this seemingly disastrous issue would be greatly appreciated.

Thanks!

Can’t you just change the filename to index.php?

Try to add error reporting as well
[php]<?php
ini_set(‘error_reporting’, E_ALL);
ini_set(‘display_errors’, ‘1’);[/php]

Also how does your directory structure look?

I tried renaming index.html to index.php and the same thing occurs.

My directory structure looks like this: /home/usr/website.com/index.html (as well as an index.php. same files, different extensions.)

no errors even with reporting on?

could you add the path to the formcraft/function.php file as well?

Asking because your /home/usr/website.com/index.html file tries to include a file one directory up, so it seems it tries to include /home/usr/formcraft/function.php, which probably isn’t correct.

I’d guess you want to change
[php]require_once(’…/formcraft/function.php’);[/php]
to
[php]require_once(‘formcraft/function.php’);[/php]

This will try to include /home/usr/website.com/formcraft/function.php

The error log says that website.com/category/index.php is missing. I created /category and copied all my other folders into it.

It worked!

Thanks for the help.

Sponsor our Newsletter | Privacy Policy | Terms of Service