try php file paths; use another placeholder
svn path=/trunk/; revision=33489
This commit is contained in:
@@ -50,6 +50,9 @@ foreach ($days as &$day) { // calculate for each day
|
||||
$output .= "<tr>";
|
||||
|
||||
// date
|
||||
if ($date = '' ) {
|
||||
$date = "Day " . $day;
|
||||
}
|
||||
$output .= "<td>" . $date . $desc . "</td>";
|
||||
|
||||
// breakfast ($r_b)
|
||||
@@ -95,11 +98,20 @@ $output .= "<td><strong>Total VKP: " . $r_total . " €</strong></td></tr></tabl
|
||||
//------------------------------------
|
||||
|
||||
function replace_page($temp, $content){
|
||||
$vars = array('%RESULT%'=>$content);
|
||||
$vars = array(':RESULT:'=>$content);
|
||||
return str_replace(array_keys($vars), $vars, $temp);
|
||||
}
|
||||
|
||||
echo 1;
|
||||
$template = file_get_contents('/home/www/html/global/internal/pd-result.en.html', true);
|
||||
echo 2;
|
||||
$template = file_get_contents('/internal/pd-result.en.html', true);
|
||||
echo 3;
|
||||
$template = file_get_contents('/../internal/pd-result.en.html', true);
|
||||
echo 4;
|
||||
$template = file_get_contents('../internal/pd-result.en.html', true);
|
||||
echo 5;
|
||||
$template = file_get_contents('http://fsfe.org/internal/pd-result.en.html', true);
|
||||
|
||||
echo replace_page($template, $output);
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<body>
|
||||
<h1>Result of calculated per diems</h1>
|
||||
|
||||
%RESULT%
|
||||
:RESULT:
|
||||
|
||||
</body>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user