Posting PHP code on webpages

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jbatty
Forum Commoner
Posts: 35
Joined: Tue Sep 23, 2003 2:42 pm

Posting PHP code on webpages

Post by jbatty »

I know this is more like a HTML question - please forgive me.
When I post my PHP scripts on a web page for my supervisor to view, the browser messes about with the code formatting and something execute part of the script. Even if a put the "code" or "pre" tags in the HTML file. How can I avoid this please.
Pozor
Forum Commoner
Posts: 74
Joined: Tue Mar 30, 2004 11:11 pm
Location: Switzerland

Post by Pozor »

Hi,

try it with

Code: Select all

<?php
show_source($file);
/*
$file should be like that -> $file='file_to_show.php';
*/
?>
this works fine, with nice highlighting!

greez Pozor
jbatty
Forum Commoner
Posts: 35
Joined: Tue Sep 23, 2003 2:42 pm

Post by jbatty »

Thank you - it worked
Post Reply