You are here: Re: replace « PHP Programming Language « IT news, forums, messages
Re: replace

Posted by alexjaquet on 04/25/06 19:25

thanks Justin for responding

-What is the context of this?

I want to open an html file, parse it and replace all
$LABEL{'label_name'} variables by the key values pairs who are placed
in an config config file I do this to *delete php code* in html page
(MVC2)

for example to store in an hash table the keys values I do :

sub loadLanguage {
$lang = $query->param("lang");
$lang = uc ($lang);
open (FILE, "<$dirLang/$lang.conf") or die "cannot open file
$dirLang/$lang.conf";
while (<FILE>) {
(local our $label, local our $value) = split(/=/);
$SERVER{$label} = $value;
}
close (FILE);
}

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация