Log In · Register

 
Show PHP includes
freeflow
post Aug 27 2005, 07:15 PM
Post #1


t-t-t-toyaaa
********

Group: Official Member
Posts: 19,821
Joined: Apr 2004
Member No: 11,270



Ok , well when writing tutorials (not on forums) i need to show php includes for them . Is there a code that allows you to show the includes? . I tried <textarea></textarea> but all i get is my server information when i do it.
 
 
Start new topic
Replies
*mipadi*
post Aug 28 2005, 02:15 AM
Post #2





Guest






In the HTML, just use the HTML character entity for the < and > characters. < is & lt; (minus the space--IPB can't display it unless there is a space) and > is & gt; (again, minus the space). So it'd look something like this:
CODE
& lt;php include('path/to/include.php'); & gt;

Or, you can use the PHP htmlentities function, which converts HTML entities:
CODE
<?php
$example = '<?php include(\'path/to/include.php\'); ?>';
echo htmlentities($example);
?>
 

Posts in this topic


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: