ASP, JSP,  PHP source

Posted on 2006-04-14
Last Modified: 2010-08-05
Can we see the sorce code of ASP, JSP, and PHP via  browser’s View | Source option
Question by:teera
    LVL 54

    Assisted Solution


    No.  Server languages process the script and return the "customized" HTML that makes up the page and is visible by Viewing Source.

    LVL 54

    Accepted Solution

    In order to actually see the script the server would have to not process it.  For example, if you renamed one of your pages with the extension .txt and the server allowed those to be viewed then your code would appear in the browser.  As long as the server is set up to process the file then the browser will only get what the server sends.

    I hope this is helpful and informative.  Let me know if you have any questions or need more details.

    LVL 32

    Assisted Solution

    Ocassionally, due to bugs in the server implementation, you can see the source itself.
    However, this is platform specific and usually fixed promptly by the vendor.

    LVL 15

    Assisted Solution

    No. It rather defeats the purpose of serverside programming and ultimate breach of security of webserver infrastructure itself.

    But there are cases like for example in MSDN where sample ASP.NET code are displayed. They have a file called srcviewer.aspx, which reads the specified ASPX page from the folder in the server, syntax colorizes it and displays the same.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Suggested Solutions

    Title # Comments Views Activity
    Xsl Nested Loop 4 18
    RSS Feeds--IE 13 136
    Magento Indexing 1 48
    two submit buttons one form 15 60
    Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
    Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
    Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
    HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now