Pablo
Dit heb ik nog nooit gehad.
Bij het aanmaken van een formulier PHP, en ik wil deze offline bekijken in een website,zie ik boven de header van de website het volgende:
"; throw new Exception($error); } $message .= $eol; foreach ($_POST as $key => $value) { if (!in_array(strtolower($key), $internalfields)) { if (is_array($value)) { $message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol; } else { $message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol; } } } $body = 'This is a multi-part message in MIME format.'.$eol.$eol; $body .= '--'.$boundary.$eol; $body .= 'Content-Type: text/plain; charset=UTF-8'.$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); } if (!ValidateEmail($autoresponder_from)) { $error .= "The specified autoresponder email address (" . $autoresponder_from . ") is invalid!\n
"; throw new Exception($error); } $autoresponder_header = 'From: '.$autoresponder_from.$eol; $autoresponder_header .= 'Reply-To: '.$autoresponder_from.$eol; $autoresponder_header .= 'MIME-Version: 1.0'.$eol; $autoresponder_header .= 'Content-Type: text/plain; charset=UTF-8'.$eol; $autoresponder_header .= 'Content-Transfer-Encoding: 8bit'.$eol; $autoresponder_header .= 'X-Mailer: PHP v'.phpversion().$eol; mail($autoresponder_to, $autoresponder_subject, $autoresponder_message, $autoresponder_header); header('Location: '.$success_url); } catch (Exception $e) { $errorcode = file_get_contents($error_url); $replace = "##error##"; $errorcode = str_replace($replace, $e->getMessage(), $errorcode); echo $errorcode; } exit; } ?>
Is dit dan wanneer ik de website upload op de server dit dan ook te zien?
Wat doe ik fout?
Groetjes
Wat doe ik fout?
Re: Wat doe ik fout?
PHP code draait alleen op een webserver.
// Love is the acceptance of nothing / Account age is no guarantee of efficiency ;-) ->
Above, Beyond, and @wwonderfull! <- Genuinely helps you with a powered up site that counts! Four Times Excellence!
Above, Beyond, and @wwonderfull! <- Genuinely helps you with a powered up site that counts! Four Times Excellence!
- BaconFries
-
- Posts: 5621
- Joined: Thu Aug 16, 2007 7:32 pm
Re: Wat doe ik fout?
You cannot "Preview" php locally (offline) you are required to publish to your host/server to see any results first. Also when publishing the page extension should be set to .php
Please read from Important notes
https://wysiwygwebbuilder.com/preview.html
Please read from Important notes
https://wysiwygwebbuilder.com/preview.html
Re: Wat doe ik fout?
Pablo
Na upload naar de server van strato, blijf ik de onderstaande regels toch zien op internet.
bovenaan de paginas.
Hoe kan dat..help.......
"; throw new Exception($error); } $message .= $eol; foreach ($_POST as $key => $value) { if (!in_array(strtolower($key), $internalfields)) { if (is_array($value)) { $message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol; } else { $message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol; } } } $body = 'This is a multi-part message in MIME format.'.$eol.$eol; $body .= '--'.$boundary.$eol; $body .= 'Content-Type: text/plain; charset=UTF-8'.$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); } if (!ValidateEmail($autoresponder_from)) { $error .= "The specified autoresponder email address (" . $autoresponder_from . ") is invalid!\n
"; throw new Exception($error); } $autoresponder_header = 'From: '.$autoresponder_from.$eol; $autoresponder_header .= 'Reply-To: '.$autoresponder_from.$eol; $autoresponder_header .= 'MIME-Version: 1.0'.$eol; $autoresponder_header .= 'Content-Type: text/plain; charset=UTF-8'.$eol; $autoresponder_header .= 'Content-Transfer-Encoding: 8bit'.$eol; $autoresponder_header .= 'X-Mailer: PHP v'.phpversion().$eol; mail($autoresponder_to, $autoresponder_subject, $autoresponder_message, $autoresponder_header); header('Location: '.$success_url); } catch (Exception $e) { $errorcode = file_get_contents($error_url); $replace = "##error##"; $errorcode = str_replace($replace, $e->getMessage(), $errorcode); echo $errorcode; } exit; } ?>
Na upload naar de server van strato, blijf ik de onderstaande regels toch zien op internet.
bovenaan de paginas.
Hoe kan dat..help.......
"; throw new Exception($error); } $message .= $eol; foreach ($_POST as $key => $value) { if (!in_array(strtolower($key), $internalfields)) { if (is_array($value)) { $message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol; } else { $message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol; } } } $body = 'This is a multi-part message in MIME format.'.$eol.$eol; $body .= '--'.$boundary.$eol; $body .= 'Content-Type: text/plain; charset=UTF-8'.$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); } if (!ValidateEmail($autoresponder_from)) { $error .= "The specified autoresponder email address (" . $autoresponder_from . ") is invalid!\n
"; throw new Exception($error); } $autoresponder_header = 'From: '.$autoresponder_from.$eol; $autoresponder_header .= 'Reply-To: '.$autoresponder_from.$eol; $autoresponder_header .= 'MIME-Version: 1.0'.$eol; $autoresponder_header .= 'Content-Type: text/plain; charset=UTF-8'.$eol; $autoresponder_header .= 'Content-Transfer-Encoding: 8bit'.$eol; $autoresponder_header .= 'X-Mailer: PHP v'.phpversion().$eol; mail($autoresponder_to, $autoresponder_subject, $autoresponder_message, $autoresponder_header); header('Location: '.$success_url); } catch (Exception $e) { $errorcode = file_get_contents($error_url); $replace = "##error##"; $errorcode = str_replace($replace, $e->getMessage(), $errorcode); echo $errorcode; } exit; } ?>
Re: Wat doe ik fout?
Heb je de pagina op PHP ingesteld?
Re: Wat doe ik fout?
Hoi Pablo
Ja beide pagina's zijn PHP
Contact.php
Contact.css
Succes.php
Succes.css
Bij Form Procssing ( General ) staat Use built in PHP form aangevinkt.
Ja beide pagina's zijn PHP
Contact.php
Contact.css
Succes.php
Succes.css
Bij Form Procssing ( General ) staat Use built in PHP form aangevinkt.
Re: Wat doe ik fout?
In dat geval is er waarschijnlik iets mis met de server configuratie.
De server zou geen PHP code naar de browser mogen sturen. Dit niet direct een WWB issue.
De server zou geen PHP code naar de browser mogen sturen. Dit niet direct een WWB issue.
Re: Wat doe ik fout?
Oke bedankt...
ik ga op onderzoek uit.
fijne dag
ik ga op onderzoek uit.
fijne dag