fjckls Posted December 9, 2010 Report Share Posted December 9, 2010 Man ir Flash lapa no kuras es suutu mainiigos uz php skriptu, kas nosuuta epastus 5ciem cilveekiem. Kaa parezi encodeet php, lai sanjeemeejam raadiitos pareizie vinja valodas burti. Lapa ir 6aas valodaas. Sheit ir mans php skripts: <?php $to = $_POST['to']; $subject = $_POST['subject']; $name = $_POST['name']; $theEmail = $_POST['email']; $message = $_POST['message']; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=UTF-8\r\n"; $headers .= "From: " . $name . " " . $theEmail . "\r\n"; $headers .= "Reply-To: " . $theEmail . "\r\n"; $headers .= "Bcc: " . $to . "\r\n"; if(@mail('', $subject, $message, $headers)) { echo "answer=ok"; } else { echo "answer=error"; } ?> Quote Link to comment Share on other sites More sharing options...
briedis Posted December 9, 2010 Report Share Posted December 9, 2010 Izmanto labāk kādu gatavu klasei meilošanai, kā piemēram, PHPMailer Quote Link to comment Share on other sites More sharing options...
indoom Posted December 9, 2010 Report Share Posted December 9, 2010 subjektu jānokodē ar base64 $subject = '=?utf-8?B?'.base64_encode($subject).'?='; Quote Link to comment Share on other sites More sharing options...
fjckls Posted December 9, 2010 Author Report Share Posted December 9, 2010 Aha paldies, obligaati nochekoshu PHPMailer ..... un pie reizes veel viens jautaajums - es uz servera apdeitoju csv failu ar mainiigajiem, kas arii naak no taas flash lapas shaadi: $File = "stats.csv"; $Handle = fopen($File, 'a'); $sender = $_POST['sender']; $receivers = $_POST['receivers']; $Data = $name . " - " . $theEmail . ",". $receps. "," . $date . "\n"; fwrite($Handle, $Data); fclose($Handle); Kad meegjinu ieimporteet csv failu ieksh excell - visi ne anglju burti raadaas kjeburaini - laikam vajag kaut kaa encodeet... @indoom - vai var liidziigi enkodeet kaa tu ieteici? $subject = '=?utf-8?B?'.base64_encode($subject).'?='; taapat $File = "stats.csv"; $Handle = fopen($File, 'a'); $sender = $_POST['sender']; $receivers = $_POST['receivers']; $Data = $name . " - " . $theEmail . ",". $receps. "," . $date . "\n"; $Data = '=?utf-8?B?'.base64_encode($subject).'?='; fwrite($Handle, $Data); fclose($Handle); paldies..... Quote Link to comment Share on other sites More sharing options...
indoom Posted December 9, 2010 Report Share Posted December 9, 2010 (edited) nu tā kodēšana vajadzīga tikai emailiem, lai subjektos rādītos utf8 teksts, citādi tur būs ķeburi, neatkarīgi no charseta. Nedomāju, ka ekseļa gadījumā tas ir pielietojams, tur jāskatās cits risinājums. Edited December 9, 2010 by indoom Quote Link to comment Share on other sites More sharing options...
fjckls Posted December 9, 2010 Author Report Share Posted December 9, 2010 nu tā kodēšana vajadzīga tikai emailiem, lai subjektos rādītos utf8 teksts, citādi tur būs ķeburi, neatkarīgi no charseta. un kaa tikt galaa ar to csv? .... vai var dariit liidziigi - nokodeet tos visus datus, lai raadiitos pareizie burti - krievu, vaacu, lv u.tml. plds! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.