php.de

Zurück   php.de > Webentwicklung > PHP Einsteiger > PHP Tipps 2004

 
 
LinkBack Themen-Optionen Thema bewerten
Alt 07.09.2004, 09:13  
Gast
 
Beiträge: n/a
Standard [Erledigt] Call to undefined function highlight()

hallöchen wie der Titel schon aussagt hab ich ein Prob ( wobei ich meine das ich vllt. nur noch etwas schlaf in den Augen hab )

aber eventuell kann mir ja jemand auf die Sprünge helfen

ich hab eine funktion in einer funktion welche durch eval aufgerufen wird
beide funktionen liegen in einer Klasse nehme ich die funktionen aus der klasse läuft alles super
hier mal der betreffende teil der Klasse
PHP-Code:
class function {
    // PHP Higlight CODE
    function &phpHighlight($str) {
    
        $str = preg_replace("/(\[)(php)(\])(\r\n)*(.*)(\[\/php\])/siU", "|highlight('\\5');|", $str);
        $str = explode('|', $str);
        eval("\$str[1] = $str[1];");
        
        foreach($str as $elem) {
            $result .= stripslashes($elem);
        }
        return $result;
        
        function &highlight($code){
            
            $code = str_replace('<?php', '', $code);
            $code = str_replace('
?>', '', $code);
            
            $code = "<?phpn".$code."n?>";
            $code = stripslashes($code);
            $code = highlight_string($code, true);
            $code = explode('
', $code);
            
            $text = 'PHP-CODE:
<div style="width:60%;background-color:#e4e4e4;border:1px solid #bfbfbf;font-family:verdana;font-size:11px;">
';
          
            for($x=0;$x<sizeof($code);$x++) {
                $text .= ($x+1).''.$code[$x].'
';
            }
            $text .= '
</div>';
            return $text;
        }
    }
}
rufe ich jetzt die Funktion phpHighlight auf bekomme ich folgenden Fehler
( das die function highlight nicht gefunden wird )
Fatal error: Call to undefined function highlight() in E:\WebSERVER\apachefriends\xampp\htdocs\standart\c lass\class.function.php(82) : eval()'d code on line 1

hoffe das jemand mir einen anstoss geben kann

gruss
 
Sponsor Mitteilung
PHP Code Flüsterer

Registriert seit: 21.08.2005
Beiträge: 4682
PHP-Kenntnisse:
Fortgeschritten

Alt 07.09.2004, 09:31  
Gast
 
Beiträge: n/a
Standard

danke hat sich erledigt hab die funktion highlight einfach ausgelagert
 
 


Themen-Optionen
Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an
Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Call to a member function on a non-object Riks PHP Tipps 2007 20 10.02.2007 22:59
Fatal error: Call to undefined function: imagettftext() Sclot PHP Tipps 2005 2 26.08.2005 13:26
Call to undefined function dbase_open() PHP Tipps 2005-2 2 10.08.2005 15:14
Call to undefined function mysql_connect mit php 5 PHP Tipps 2005-2 13 16.07.2005 12:55
Fatal error: Call to undefined function mail() PHP Tipps 2005-2 16 04.07.2005 13:24
Call to undefined function dbmopen() bicpi PHP Tipps 2005 8 29.05.2005 16:01
Fatal error: Call to undefined function ora_logon() in file PHP Tipps 2005 2 25.01.2005 17:30
Call to undefined function preg_match() PHP Tipps 2005 5 15.01.2005 18:07
Fatal error: Call to undefined function: imagecreatefromjpeg DannyD PHP-Fortgeschrittene 10 05.12.2004 21:59
Fatal error: Call to undefined function mysql_connect() Datenbanken 4 11.11.2004 17:53
call to undefined function mail() <- funktionierte bis ge Promaetheus PHP Tipps 2004 9 07.10.2004 11:39
[Erledigt] Call to undefined function mysql_connect() Datenbanken 4 24.08.2004 22:04
Fatal error: Call to undefined function: sqlite_open()..... PHP Tipps 2004 11 01.08.2004 17:44
Fatal error: Call to undefined function: mail() in... PHP Tipps 2004 5 31.07.2004 17:25
[Erledigt] Fatal error: Call to undefined function:... PHP Tipps 2004 8 27.06.2004 12:56

Besucher kamen über folgende Suchanfragen bei Google auf diese Seite
call to undefined function dbase_open() xampp, php xampp call to undefined function dbase_open, php call to undefined function class, call to undefined function: preg_match(), call to undefined function php, call to undefined function dbase_open(), call to undefined function codier, fatal error: call to undefined function dbmopen() in xampp, call to undefined function dbase_open() in xampp, xampp dbase_open, call to undefined function dbmopen() xampp htdocs, call to undefined function dbmopen() xampp, xampp \call to undefined function dbase_open\, call to undefined function dbase_open() in c:\\program files\\xampp\\htdocs\\, call to undefined function, xampp call to undefined function ora_logon()

Alle Zeitangaben in WEZ +2. Es ist jetzt 02:50 Uhr.




Powered by vBulletin® Version 3.7.2 (Deutsch)
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Aprilia-Forum, Aquaristik-Forum, Liebeskummer-Forum, Zierfisch-Forum, Geizkragen-Forum

Creative Commons License
Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.