J'ai le morceau suivant de code PHP publiée dans une rubrique:
function wdates($start = 0, $amount = 10, $format = 'Y', $interval = 'Y', $decrease = true)
{
// Determining where we should start the dates (In years)
$start = ((is_numeric($start)) ? $start : 0);
// Accomidating the AMOUNT returned accordignly to the START
$amount += $start;
// Creating an array of years {$amount} times
for($i = $start; $i <= $amount; ++$i)
{
// Checking the interval to increase/decrease by
$int = (($interval == 'D') ? 'day' : (($interval == 'M') ? 'month' : 'year'));
// Checking if we are decreasing or increasing
$loop = (($decrease == true) ? '-' : '+');
// Creating the appropriate time stampe
$tmsp = strtotime($loop . $i . ' ' . $int);
// Building the date array
$date_arr[] = date($format, $tmsp);
}
// Returning the date array
return $date_arr;
}
- function wdates($start = 0, $amount = 10, $format = 'Y', $interval = 'Y', $decrease = true)
- {
- // Determining where we should start the dates (In years)
- $start = ((is_numeric($start)) ? $start : 0);
-
- // Accomidating the AMOUNT returned accordignly to the START
- $amount += $start;
-
- // Creating an array of years {$amount} times
- for($i = $start; $i <= $amount; ++$i)
- {
- // Checking the interval to increase/decrease by
- $int = (($interval == 'D') ? 'day' : (($interval == 'M') ? 'month' : 'year'));
-
- // Checking if we are decreasing or increasing
- $loop = (($decrease == true) ? '-' : '+');
-
- // Creating the appropriate time stampe
- $tmsp = strtotime($loop . $i . ' ' . $int);
-
- // Building the date array
- $date_arr[] = date($format, $tmsp);
- }
-
- // Returning the date array
- return $date_arr;
- }
Le problème est que tous les signes plus (+) sont supprimés du code.
Le problème n'est pas seulement dans le code, mais avec l'ensemble du poste lui-même. S'il m'arrive d'avoir un signe plus dans le poste (comme C + + ou quelque chose), tous sont supprimés.
Regardez
ce poste par exemple...au fond quand Im parler de la balise de syntaxe, il ya l'exemple de code que j'ai collé ci-dessus, ces signes plus que vous voyez ici sont juste des espaces vides sur mon site...comment puis-je résoudre ce problème?
Merci d'avance!
"Bring forth therefore fruits meet for repentance:" Matthew 3:8