getRealPath(); // sanitize directory separator $form_class_path = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $form_class_path); $real_root_path = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $real_root_path); $plugins_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/' . ltrim(str_replace(array($real_root_path, DIRECTORY_SEPARATOR), array('', '/'), $plugins_path), '/'); $current_dir = str_replace(basename(__FILE__), '', $_SERVER['SCRIPT_NAME']); $phpformbuilder_include_code = 'include_once rtrim($_SERVER[\'DOCUMENT_ROOT\'], DIRECTORY_SEPARATOR) . \'' . $current_dir . 'Form.php\';'; } ?> Php Form Builder - Help file for include and other paths

Php Form Builder - Help file for include and other paths

PHP Version

Your PHP Version is

Solve Error 500

The correct include statement to include Form.php is the following:


You have to replace the following code:
include_once rtrim($_SERVER['DOCUMENT_ROOT'], DIRECTORY_SEPARATOR) . '/phpformbuilder/Form.php';
in your forms - the template files or your own forms php files - with the correct include statement shown above.

This is the default path used in all templates. You've got nothing to change.

Don't forget to revert true to false Line 15 to protect this file against unauthorized access

The variables below provide some useful debugging information about your server configuration

$plugins_path
$_SERVER['SCRIPT_NAME']
$_SERVER['SCRIPT_FILENAME']
$root_path
$real_root_path
$form_class_path
$real_root_path
$plugins_url

This file is protected against unauthorized access.

To allow access and display information, open this file in your code editor and replace false with true Line 15.