Jump to content

[SOLVED] highlight_file(); doesn't stay within CSS div's


MasterACE14

Recommended Posts

I am trying to use highlight_file(); within a div, but if the script I am highlighting is too wide(too many words on 1 line) it will creep out of the CSS div. This isn't a CSS problem, but a problem with the highlight_file(); function. I have tried to work around using highlight_file(); with no success. I have tried using include_once(); with strip_tags(); but it still executes the script, instead of showing the source. So I  haven't even got as far as creating my own syntax highlighting script.

 

is there another function I can use to highlight a external file? or is there a way to include the file, stop it from executing and then highlight the syntax myself? while still having it stay within the CSS div?

 

Regards ACE

Your problem more than liekly is that of a CSS issue, however...

 

s there another function I can use to highlight a external file? or is there a way to include the file, stop it from executing and then highlight the syntax myself?

 

You might try....

 

<?php

 highlight_string(file_get_contents('file.php'));

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.