Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / var / www / html / ulungkusma_web_id / lib_palsu / | server ip : 172.67.156.115 your ip : 172.69.130.147 H O M E |
Filename | /var/www/html/ulungkusma_web_id/lib_palsu/parsing.php |
Size | 649 |
Permission | rw-rw-r-- |
Owner | ulung : ulung |
Create time | 27-Apr-2025 11:16 |
Last modified | 05-Feb-2025 12:52 |
Last accessed | 05-Jul-2025 13:03 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
<?php
function Parse($template_file,$tags) {
if(!file_exists($template_file))
{
echo "File Template <b>$template_file</b> nggak ada salah kali.......";
return 0;
}
$contents = implode("",file($template_file));
while (list($key,$value) = each($tags)) {
$tag = "{".$key."}";
/*
if(!strstr($contents,$tag))
{
echo "nggak ngetemuin tag <b> $tag </b> di file template <b>".$template_file.".</b> coba cek lagi.....";
return 0;
}
*/
$contents = str_replace($tag,$value,$contents);
}
print($contents);
}
?>
function Parse($template_file,$tags) {
if(!file_exists($template_file))
{
echo "File Template <b>$template_file</b> nggak ada salah kali.......";
return 0;
}
$contents = implode("",file($template_file));
while (list($key,$value) = each($tags)) {
$tag = "{".$key."}";
/*
if(!strstr($contents,$tag))
{
echo "nggak ngetemuin tag <b> $tag </b> di file template <b>".$template_file.".</b> coba cek lagi.....";
return 0;
}
*/
$contents = str_replace($tag,$value,$contents);
}
print($contents);
}
?>