| FAQ |
| Kalender |
|
|
#1 | ||
|
|||
|
Flitig postare
|
Kan någon hjälpa mig .
Skulle behöva få in <?php include("includes/".$this->cat->cat_id)."openhour.php"; ?> I skriptet nedan. <?php include 'holiday.php'; $holiday = checkHoliday(date('Y-m-d')); if ($holiday == 'NULL'){ $holiday = "****här vill jag har in php include ovan******"; } echo '<span class="holiday">' . $holiday . '</span>'; ?> |
||
|
|
Svara med citat
|
|
|
#2 | ||
|
|||
|
Medlem
|
Kod:
<?php
include 'holiday.php';
$holiday = checkHoliday(date('Y-m-d'));
if ($holiday == 'NULL'){
include("includes/".$this->cat->cat_id)."openhour.php";
$holiday = "****här vill jag har in php include ovan******";
}
echo '<span class="holiday">' . $holiday . '</span>';
?>
Du kan inte inkludera till en variabel. Antingen importerar du en funktion som du returnerar resultatet till variabeln eller å kör du file_get_contents() för att få filinnehållet i variabeln. |
||
|
|
Svara med citat
|
|
|
#3 | ||
|
|||
|
Medlem
|
Citat:
PHP-kod:
|
||
|
|
Svara med citat
|
|
|
#4 | ||
|
|||
|
Flitig postare
|
Citat:
|
||
|
|
Svara med citat
|
| Svara |
|
|