Search code examples
javascriptsyntaxhighlighter

alex gorbatchev's syntax highlighter giving an error message


I'm getting the following error message in Chrome and firefox while trying to implement gorbachev's syntax highlighter.

The page at local host says: SyntaxHighlighter Can"t find brush for: php

It's all the more frustrating because i just got it working on a test page in the same folder, it still works. There is very little different between the two pages. Here's my code:

<??>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> 

<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 

<!--STYLESHEET LINKS-->
<link  href="stylesheet.css" rel="stylesheet" type="text/css" media="screen" />
<link  href="shThemeDefault.css" rel="stylesheet" type="text/css" media="screen" />
<link  href="shCore.css" rel="stylesheet" type="text/css" media="screen" />

<!--JQUERY SCRIPTS-->
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery-ui.js"></script>

<!--PROCESSING SCRIPTS
<script type="text/javascript" src="processing.js"></script>
<script type="text/javascript" src="init.js"></script>
-->
<!--syntax highlighter-->
<script type="text/javascript" src="shBrushPhp.js"></script>
<script type="text/javascript" src="shCore.js"></script>

<script type="text/javascript">
$(document).ready(function() {
   // put all your jQuery goodness in here.
   SyntaxHighlighter.all();
 });
</script>
</head>


<title>code</title>

<body>
<div id="content">
<h2>code</h2>
<pre class="brush: php">
$last_modified = filemtime("header.php");
echo("last modified: ");
echo(date("m.j.y h:ia", $last_modified));
</pre>

<!--<script type="application/processing">
</script>
<canvas data-processing-sources="processing/lines.pde">
</canvas> -->
</div>
</body>
</html>
<??>

Solution

  • i just moved all the content from the page into the test page, renamed it and it works fine now. just one of those things i guess.