delavar12
یک شنبه 27 بهمن 1392, 14:39 عصر
سلام عزیزان
کد زیر رو دارم. این کد مال یک اسکریپت ارسال ایمیل هست. بعد از اینکه دکمه ارسال فرم را میزنم خطای زیر رو میده :
Warning: preg_replace() [function.preg-replace]: No ending delimiter '#' found in /home/public_html/email.php on line 106
##############################
$main='';
foreach($_POST as $k => $v)
{
$lists=$body;
$lists=preg_replace('#field',$k,$body);
$lists=preg_replace('#info',$v,$lists);
$main .=$lists;
}
#############################
$ip= $_SERVER['REMOTE_ADDR'];
$link=$_SERVER['HTTP_REFERER'];
$footer=preg_replace('#ip',$ip,$footer);
$footer=preg_replace('#link',$link,$footer);
$body=$top.$main.$footer;
mail($to,$subject,$body, $header);
header("location: $redirect")
لطفا کمک کنید . چکار کنم مشکل برطرف بشه. من هیچی از PHP نمیدونم
خیلی ممنونم
کد زیر رو دارم. این کد مال یک اسکریپت ارسال ایمیل هست. بعد از اینکه دکمه ارسال فرم را میزنم خطای زیر رو میده :
Warning: preg_replace() [function.preg-replace]: No ending delimiter '#' found in /home/public_html/email.php on line 106
##############################
$main='';
foreach($_POST as $k => $v)
{
$lists=$body;
$lists=preg_replace('#field',$k,$body);
$lists=preg_replace('#info',$v,$lists);
$main .=$lists;
}
#############################
$ip= $_SERVER['REMOTE_ADDR'];
$link=$_SERVER['HTTP_REFERER'];
$footer=preg_replace('#ip',$ip,$footer);
$footer=preg_replace('#link',$link,$footer);
$body=$top.$main.$footer;
mail($to,$subject,$body, $header);
header("location: $redirect")
لطفا کمک کنید . چکار کنم مشکل برطرف بشه. من هیچی از PHP نمیدونم
خیلی ممنونم