Help please! Error when publishing my website

Issues related to previewing and publishing your web site.
Post Reply
User avatar
Julieta C.
 
 
Posts: 3
Joined: Tue Apr 23, 2019 12:24 am

Help please! Error when publishing my website

Post 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!
User avatar
Pablo
 
Posts: 21569
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Help please! Error when publishing my website

Post 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
User avatar
Julieta C.
 
 
Posts: 3
Joined: Tue Apr 23, 2019 12:24 am

Re: Help please! Error when publishing my website

Post by Julieta C. »

Hi!

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

Thanks!
User avatar
BaconFries
 
 
Posts: 5324
Joined: Thu Aug 16, 2007 7:32 pm

Re: Help please! Error when publishing my website

Post 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
User avatar
Julieta C.
 
 
Posts: 3
Joined: Tue Apr 23, 2019 12:24 am

Re: Help please! Error when publishing my website

Post by Julieta C. »

Thaks!

I'm goingI'm going to check it.

:D
Post Reply