View previous topic :: View next topic |
Author |
Message |
Joelito -
Joined: 28 Dec 2005 Posts: 9 Location: Tijuana, BC, México
|
Posted: Fri Dec 29, 2006 5:43 pm Post subject: phps |
|
|
I search for the forums about how to display a source using the extension .phps.
I went to SSI parameters and I found this extensions:
shtml
shtm
stm
I added the phps one and I restarted Abyss.
When I try to view, let's say hello.phps, the browser has a blank page, but when you see the source-code of the page you can see clearly the php source code.
I'm trying to display highlighted source code.
Thanks! _________________ Source Code, plugins, skins, Nsis en español, Got IRC?. |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Fri Dec 29, 2006 6:22 pm Post subject: |
|
|
Hello Joelito,
I believe the code for highlighting PHP code is the following. This is the proper
way for highlighting a PHP file.
01. Put the PHP source code in a file called "source.phps"
02. Create a new file called "view_source.php" with the following
code provided below.
Code: | <?php
highlight_file("source.phps");
?>
|
03. Now open your browser and browse to "view_source.php" and you will see
your highlighted PHP code. E.g.: http://localhost/view_source.php
Note: Both files need to be in the same directory, and PHP needs to be
installed before this will work. The PHPS extension is optional. I just used
it so it's easier for you to locate the file with the source.
Sincerely, Josh (TRUSTAbyss) |
|
Back to top |
|
 |
Joelito -
Joined: 28 Dec 2005 Posts: 9 Location: Tijuana, BC, México
|
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|