Show PHP includes |
![]() ![]() |
Show PHP includes |
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.
|
|
|
|
| *mipadi* |
Aug 27 2005, 11:38 PM
Post
#2
|
|
Guest |
What do you mean by "show them"? Show the code, show the line with the include() function, show the path to the file?
|
|
|
|
Aug 27 2005, 11:45 PM
Post
#3
|
|
|
t-t-t-toyaaa ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 19,821 Joined: Apr 2004 Member No: 11,270 |
ok say i was writing a tutorials and there was a include code that i had to show for someone to put in there wordpress for example. I need to show the include , not have the path Just show it .
Show like this: <? include("BLAHBLAHBLAH");?> |
|
|
|
| *mipadi* |
Aug 28 2005, 02:15 AM
Post
#4
|
|
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); ?> |
|
|
|
Aug 28 2005, 02:38 AM
Post
#5
|
|
|
t-t-t-toyaaa ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 19,821 Joined: Apr 2004 Member No: 11,270 |
Grr Your amazing . The first one worked , second one didn't but one works so thats great thanks so much again.
|
|
|
|
![]() ![]() |