| Autor | Zpráva | ||
|---|---|---|---|
| MEMPHIS Profil * |
#1 · Zasláno: 21. 5. 2009, 19:12:07
Dobrý den,
potřeboval bych poradit co dělat s touto chybou kompletně mi to vypisuje : Fatal error: Call to undefined function: htmlspecialchars_decode() in /3w/wz.cz/n/nabytek-kubicek/index.html on line 102 .htaccess vypadá takhle : ErrorDocument 404 /chybovka.html AddType application/x-httpd-php .php .php3 .php4 .php5 .htm .html php_flag allow_url_fopen on <Files *.html> ForceType application/x-httpd-php </Files> Hosting je webzdarma.cz Kompletní vložený kód : <?php # Konfigurace
$ZpetneOdkazyId = 854;
# Funkce na vytvoření cache
function ZpetneOdkazyVytvorCache( $ZpetneOdkazyId )
{
$ZpetneOdkazyDestination = fopen( "zpetneodkazy_" . $ZpetneOdkazyId . ".xml" , "w" );
if ( ! $ZpetneOdkazyDestination )
die( "Do souboru zpetneodkazy_" . $ZpetneOdkazyId . ".xml nelze zapisovat!" );
$ZpetneOdkazySource = fopen( "http://api.zpetne-odkazy.info/?webid=" . $ZpetneOdkazyId , "r" );
if ( ! $ZpetneOdkazySource )
return;
while( ! feof( $ZpetneOdkazySource ) )
fwrite( $ZpetneOdkazyDestination , fgets( $ZpetneOdkazySource ) );
fclose( $ZpetneOdkazySource );
fclose( $ZpetneOdkazyDestination );
}
# Cache a kontroly
if ( file_exists( "zpetneodkazy_" . $ZpetneOdkazyId . ".xml" ) )
{
if ( time( ) - filectime( "zpetneodkazy_" . $ZpetneOdkazyId . ".xml" ) > 3600 )
ZpetneOdkazyVytvorCache( $ZpetneOdkazyId );
}
# Vytvoření prvního cache souboru
else
ZpetneOdkazyVytvorCache( $ZpetneOdkazyId );
# Parsování XML cache
$ZpetneOdkazyContent = file_get_contents( "zpetneodkazy_" . $ZpetneOdkazyId . ".xml" );
preg_match( "|<nastaveni[[:space:]]style=\"+(.*)\"[[:space:]]{0,}separator=\"+(.*)\"[[:space:]]{0,}/>|" , $ZpetneOdkazyContent , $ZpetneOdkazySetting );
preg_match_all( "|<link[[:space:]]id=\"([0-9]{1,})\"[[:space:]]url=\"(.*)\"[[:space:]]title=\"(.*)\">(.*)</link>|" , $ZpetneOdkazyContent , $ZpetneOdkazyContent , PREG_SET_ORDER );
foreach( $ZpetneOdkazyContent as $ZpetneOdkazyRow )
echo "<a href='" . $ZpetneOdkazyRow[2] . "' title='" . $ZpetneOdkazyRow[3] . "' style='" . $ZpetneOdkazySetting[1] . "'>" . $ZpetneOdkazyRow[4] . "</a>" . htmlspecialchars_decode( $ZpetneOdkazySetting[2] );
?>Díky za rady. MEMPHIS |
||
| Jan Tvrdík Profil |
#2 · Zasláno: 21. 5. 2009, 19:16:36
MEMPHIS:
Funkce htmlspecialchars_decode je k dispozici až od PHP verze 5.1.0. Na serveru webzdarma, který používáš, je (pokud vím) stále PHP 4. |
||
|
Časová prodleva: 16 let
|
|||
0