ms11309
شنبه 21 تیر 1393, 19:28 عصر
سلام دوستان
یه خطا در کد زیر دریافت میکنم که دلیلش رو نمیدونم
لطفا راهنمایی کنید مشکلش کجاست؟
Fatal error: Cannot redeclare before() (previously declared in /home/***/public_html/on.php:3) in /home/***/public_html/on.php on line 5
<?php
ini_set("display_errors", 0);
function before($this, $inthat) {
return substr($inthat, 0, strpos($inthat, $this));
}
function after($this, $inthat) {
if(!is_bool(strpos($inthat, $this))) {
return substr($inthat, strpos($inthat,$this)+strlen($this));
} else {
return false;
}
}
function between($this, $that, $inthat) {
return before($that, after($this, $inthat));
}
function occurrencecount($this, $that, $inthat, $count) {
$newinthat = after("$that", after("$this", $inthat));
if($newinthat != false) {
$count = $count + 1;
return occurrencecount($this, $that, $newinthat, $count);
} else {
return $count;
}
}
?>
لازم به ذکر کل کد اینصفحه همینه
لطفا هرچه سریعتر کمکم کنید خواهشااااا
یه خطا در کد زیر دریافت میکنم که دلیلش رو نمیدونم
لطفا راهنمایی کنید مشکلش کجاست؟
Fatal error: Cannot redeclare before() (previously declared in /home/***/public_html/on.php:3) in /home/***/public_html/on.php on line 5
<?php
ini_set("display_errors", 0);
function before($this, $inthat) {
return substr($inthat, 0, strpos($inthat, $this));
}
function after($this, $inthat) {
if(!is_bool(strpos($inthat, $this))) {
return substr($inthat, strpos($inthat,$this)+strlen($this));
} else {
return false;
}
}
function between($this, $that, $inthat) {
return before($that, after($this, $inthat));
}
function occurrencecount($this, $that, $inthat, $count) {
$newinthat = after("$that", after("$this", $inthat));
if($newinthat != false) {
$count = $count + 1;
return occurrencecount($this, $that, $newinthat, $count);
} else {
return $count;
}
}
?>
لازم به ذکر کل کد اینصفحه همینه
لطفا هرچه سریعتر کمکم کنید خواهشااااا