Page 1 of 1

Help please! Error when publishing my website

Posted: Tue Apr 23, 2019 1:10 am
by Julieta C.
Hi!


Error when publishing my website on the internet this fail appears at the top of the page.

} if (!empty($error)) { $errorcode = file_get_contents($error_url); $replace = "##error##"; $errorcode = str_replace($replace, $error, $errorcode); echo $errorcode; exit; } $internalfields = array ("submit", "reset", "send", "filesize", "formid", "captcha_code", "recaptcha_challenge_field", "recaptcha_response_field", "g-recaptcha-response"); $message .= $eol; $message .= "IP Address : "; $message .= $_SERVER['REMOTE_ADDR']; $message .= $eol; $logdata = ''; foreach ($_POST as $key => $value) { if (!in_array(strtolower($key), $internalfields)) { if (!is_array($value)) { $message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol; } else { $message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol; } } } $body = 'This is a multi-part message in MIME format.'.$eol.$eol; $body .= '--'.$boundary.$eol; $body .= 'Content-Type: text/plain; charset=ISO-8859-1'.$eol; $body .= 'Content-Transfer-Encoding: 8bit'.$eol; $body .= $eol.stripslashes($message).$eol; if (!empty($_FILES)) { foreach ($_FILES as $key => $value) { if ($_FILES[$key]['error'] == 0) { $body .= '--'.$boundary.$eol; $body .= 'Content-Type: '.$_FILES[$key]['type'].'; name='.$_FILES[$key]['name'].$eol; $body .= 'Content-Transfer-Encoding: base64'.$eol; $body .= 'Content-Disposition: attachment; filename='.$_FILES[$key]['name'].$eol; $body .= $eol.chunk_split(base64_encode(file_get_contents($_FILES[$key]['tmp_name']))).$eol; } } } $body .= '--'.$boundary.'--'.$eol; if ($mailto != '') { mail($mailto, $subject, $body, $header); } header('Location: '.$success_url); exit; } ?>

You can help me? :oops:

thanks!

Re: Help please! Error when publishing my website

Posted: Tue Apr 23, 2019 6:49 am
by Pablo
This is not an error. This is the PHP code of the form.

This either means that you did not set the file extension in page properties to 'php'
or your web account does not support PHP.

Related FAQ:
viewtopic.php?f=10&t=32967

Re: Help please! Error when publishing my website

Posted: Thu Apr 25, 2019 2:48 am
by Julieta C.
Hi!

How can I solve it, so that it is not displayed at the beginning. :oops:

Thanks!

Re: Help please! Error when publishing my website

Posted: Thu Apr 25, 2019 4:36 am
by BaconFries
How can I solve it, so that it is not displayed at the beginning.

1. Ensure that your host/server supports PHP.
2. Set the page extension to be .php and not .html or .htm

Related FAQ:
viewtopic.php?f=10&t=32967

Re: Help please! Error when publishing my website

Posted: Thu Apr 25, 2019 5:15 am
by Julieta C.
Thaks!

I'm goingI'm going to check it.

:D