| GHengeveld |
|
|---|---|
|
Several things are wrong with this code (pagetextbyidn.code.php). Try this code:
<?php
if (!defined('SED_CODE')){die('Wrong URL.'); }
$currenttpl = file_get_contents($mskin);
if (mb_strpos($currenttpl, "{PAGE_TEXT_ID_") !== false)// if tag exist on page
{
$matches = array();
preg_match_all("#{(?P<tag>PAGE_TEXT_ID_(?P<id>[0-9]+))}#", $currenttpl, $matches, PREG_SET_ORDER);
foreach ($matches as $match){
$p_tag = $match['tag'];
$p_id = $match['id'];
etc...
Update: fixed the regex Відредаговано: GHengeveld (07.05.2012 22:21, 13 років тому) |