IT Community - Software Programming, Web Development and Technical Support

Showing PHP source

This is a discussion on Showing PHP source within the PHP Programming forums, part of the Web Development category; Hi, I have seen a special feature in PHP: Hypertext Preprocessor site, they are showing each and every page's ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > PHP Programming

Register FAQ Members List Calendar Mark Forums Read
  #1  
Old 07-21-2007, 01:46 AM
jegan jegan is offline
D-Web Sr.Programmer
 
Join Date: Jul 2007
Posts: 157
jegan is on a distinguished road
Question Showing PHP source

Hi,

I have seen a special feature in PHP: Hypertext Preprocessor site, they are showing each and every page's PHP source in separate page. I don't think so, they are doing this in a hard coded manner. Because they are showing the PHP source for all pages, even for the separate page, where they are showing the PHP source. Can any body explain me how this works out??
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 07-24-2007, 12:09 AM
vijayanand vijayanand is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 246
vijayanand is on a distinguished road
Default Re: Showing PHP source

u can use the show_source($_SERVER['SCRIPT_FILENAME']);

following is the example:
if ($_REQUEST['showsource']) {
print "<hr><a name='source'> </a><h1>PHP Source:</h1>";
$source= show_source($_SERVER['SCRIPT_FILENAME']);
}

where showsource is the post or get variables which is set when view source code button or link is clicked
__________________

J.Vijayanand
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Source Safe -> Source Control in Team Foundation shaalini Server Management 3 09-09-2009 07:08 AM
only showing a value if it equals something? nicolem443 PHP Programming 0 12-26-2008 11:09 AM
show clocks, one showing the current time, and another showing a time 12 hours behind itbarota HTML, CSS and Javascript Coding Techniques 1 02-13-2008 09:15 PM
How can I hide the JavaScript source code from "view source" function of the browser? KiruthikaSambandam HTML, CSS and Javascript Coding Techniques 1 11-13-2007 08:17 PM
How to run win app without showing it in task manager Gopisoft VB.NET Programming 1 07-18-2007 12:36 AM


All times are GMT -7. The time now is 12:13 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
One Way Moving Companies | Stamford Dentist | Euro Millions Lottery | Home Loans| Furniture

SEO by vBSEO 3.0.0