Ben içeriği ile bir. Ini dosyası var ...
[template]
color1 = 000000
color2 = ff6100
color3 = ff6100
color4 = 000000
Ve aşağıda içeriği ile bir dosya 2 değerlerinde geçer functions.php denir:
(Renk 1-4) aranıyorsa özgü renk numarası renklerin aranmaktadır $ ve spot tema / şablon, adıdır $ Mytheme,
$myTheme = $_REQUEST['theme'];
$spot = $_REQUEST['spot'];
$myColor = get_option($myTheme);
$path_to_ini = "styles/". $myTheme . "/template.ini";
if ($myColor == "") {
if($spot == 1){$myColor = [insert color1 value here];}
if($spot == 2){$myColor = [insert color2 value here];}
if($spot == 3){$myColor = [insert color3 value here];}
if($spot == 4){$myColor = [insert color4 value here];}
}
echo $myColor;
Ben template.ini dosyasından uygun renk ile parantez veri doldurmak için ini dosyasını ayrıştırmak için nasıl yardım arıyorum.