Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 278
  • Last Modified:

View php code in the browser

Hi E's, have any way to show in the browser the entire code of a file, like php, html, etc (is not execute, is just show like we see in a text editor).
In practice, I try to create my own web develop library, and when I want to get access to my tutorials and see the code of the files of my tutorials, I simple see the code in the browser.

Is possible, and how?

Regards, JC
0
Pedro Chagas
Asked:
Pedro Chagas
  • 3
  • 3
2 Solutions
 
re-searcherCommented:
Hi There,

With local/online web server it's not possible.
just way for this job is you using HTML table content and then set link to php file.
+ another way which i'm not sure about it is using another file name cross of your .php file folder with .phps extention or .txt
+ or using fopen() function and print file contents.
+ also we have some function for showing source like show_source and highlight_file (php 4 and 5)
0
 
Pedro ChagasWebmasterAuthor Commented:
Hi, this is the best solution:
http://hurring.com/scott/code/php/view_source/

Regards, JC
0
 
Pedro ChagasWebmasterAuthor Commented:
I've requested that this question be closed as follows:

Accepted answer: 0 points for joaochagas's comment http:/Q_27401398.html#36982970
Assisted answer: 150 points for re-searcher's comment http:/Q_27401398.html#36982921

for the following reason:

My solution resolve the issue in a easy way.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
re-searcherCommented:
the last way which i said in my previous post is show_source and highlight_file (alias of show_source) .
0
 
re-searcherCommented:
my answer is complete and contain best solution.
0
 
Pedro ChagasWebmasterAuthor Commented:
My own solution is more specific and have a practical example.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now