This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Dreamweaver > December 2005 > How can I make PHP code appear as text?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How can I make PHP code appear as text?
|
|
| Lady18wheels 2005-12-26, 6:30 pm |
| How can I make <?php echo '<p>Hello World</p>'; ?> appear as text in a document? I tried using <code> </code> tags, but I still got that funny little PHP symbol.
| |
|
| Do you want it to be visible in the final web page, not parsed and executed
by the server?
Then paste it or type it in Design view.
That will convert the < and > to html entity characters < and > which
will display that line as text, instead of html and PHP tags.
<?php echo '<p>Hello World</p>'; ?>
> How can I make <?php echo '<p>Hello World</p>'; ?> appear as text in a
> document? I tried using <code> </code> tags, but I still got that funny
> little PHP symbol.
| |
| zerof 2005-12-26, 10:32 pm |
| Lady18wheels escreveu:
> How can I make <?php echo '<p>Hello World</p>'; ?> appear as text in a document? I tried using <code> </code> tags, but I still got that funny little PHP symbol.
----------
To make visible the code ( as text ), of one complete file:
1 )Upload the file, "exampl.php" to the server.
2 )Create one page ( "page.php" ), where "exampl.php" will be shown as a
text, and write this code:
<?php highlight_file( "pathto/exampl.php", TRUE ); ?>
- Call with the browser: page.php
- Te code of exampl.php will appear as text at the proper location.
3)Another way is, to upload the file "exampl.php" renamed to exampl.phps".
- Call with the browser: exampl.php
----
zerof
| |
|
| Or use the <pre> tags
zerof wrote:
> Lady18wheels escreveu:
>
>
> ----------
> To make visible the code ( as text ), of one complete file:
>
> 1 )Upload the file, "exampl.php" to the server.
> 2 )Create one page ( "page.php" ), where "exampl.php" will be shown as a
> text, and write this code:
>
> <?php highlight_file( "pathto/exampl.php", TRUE ); ?>
>
> - Call with the browser: page.php
> - Te code of exampl.php will appear as text at the proper location.
>
> 3)Another way is, to upload the file "exampl.php" renamed to exampl.phps".
>
> - Call with the browser: exampl.php
> ----
> zerof
--
kim
--------------------------
http://mouseriders.dk
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|