Heey allemaal!
Ik wilde even kijken hoe ik mijn (php) scripts op internet kon highlighten, en toen vond ik het Geshi Highlighter script.
Het enige probleem is dat ik niet weet hoe ik m werkend krijg...
De class is 4755 regels lang, dus die post ik maar niet, maar je kan m hier downloaden:
http://sourceforge.net/projects/geshi/files/geshi/GeSHi%201.0.8.9/GeSHi-1.0.8.9.zip/download
Ik probeer m nu zo aan te roepen in test.php:
Maar dan krijg ik deze error:
Quote:
Warning: Missing argument 2 for geshi_highlight(), called in /home/onehosted/domains/onehosted.nl/public_html/test.php on line 16 and defined in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 4738
Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 2020
Warning: Invalid argument supplied for foreach() in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 2020
Warning: Invalid argument supplied for foreach() in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 2392
Warning: implode() [function.implode]: Argument must be an array in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 3345
Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 3368
Warning: Invalid argument supplied for foreach() in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 3368
Warning: Invalid argument supplied for foreach() in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 3409
Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 3461
Warning: Invalid argument supplied for foreach() in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 3461
Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 3606
Warning: Invalid argument supplied for foreach() in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 3606
Ik hoop dat iemand me kan helpen!
Gr. Jos
Ik wilde even kijken hoe ik mijn (php) scripts op internet kon highlighten, en toen vond ik het Geshi Highlighter script.
Het enige probleem is dat ik niet weet hoe ik m werkend krijg...
De class is 4755 regels lang, dus die post ik maar niet, maar je kan m hier downloaden:
http://sourceforge.net/projects/geshi/files/geshi/GeSHi%201.0.8.9/GeSHi-1.0.8.9.zip/download
Ik probeer m nu zo aan te roepen in test.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Geshi Test</title>
</head>
<body>
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"geshi.php"[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]<?php echo"Hahahahahahah, nuubs"; ?>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] geshi_highlight[COLOR= #007700]([/COLOR][COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
?>
</body>
</html> Maar dan krijg ik deze error:
Quote:
Warning: Missing argument 2 for geshi_highlight(), called in /home/onehosted/domains/onehosted.nl/public_html/test.php on line 16 and defined in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 4738
Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 2020
Warning: Invalid argument supplied for foreach() in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 2020
Warning: Invalid argument supplied for foreach() in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 2392
Warning: implode() [function.implode]: Argument must be an array in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 3345
Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 3368
Warning: Invalid argument supplied for foreach() in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 3368
Warning: Invalid argument supplied for foreach() in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 3409
Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 3461
Warning: Invalid argument supplied for foreach() in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 3461
Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 3606
Warning: Invalid argument supplied for foreach() in /home/onehosted/domains/onehosted.nl/public_html/geshi.php on line 3606
Ik hoop dat iemand me kan helpen!
Gr. Jos

)