SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2009
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    newbie to php so mind the silli question, but

    if a web page comes up index.php but theres no php programming coded into that page, what does this mean?

  2. #2
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Are you saying you have code in index.php but nothing is displayed? If so, add the following to lines of code at the top of the script.
    PHP Code:
    error_reporting(-1);
    ini_set('display_errors'true); 
    Hopefully, you'll see if there are errors occurring. You may need to check your web server and PHP logs too.

    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2009
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi,
    you see Im a newbie at making sites and I have come across some websites where I view the source code. The index page is sometimes saved as index.php.
    but no php code to be seen,

    I was just wondering.

  4. #4
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    The web server runs the PHP script (index.php) and displays what it's instructed by the script. If everything is configured correctly, you'll never (purposely) see any PHP code with your browser.
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  5. #5
    SitePoint Member
    Join Date
    Apr 2011
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The only way you will actually see the source code is if you have access to the actual file before it is parsed.

    What you see in your browser is the output that is generated from the PHP, not the actual code, and as Anthony said you will never see any PHP code in your browser like that.

  6. #6
    SitePoint Enthusiast
    Join Date
    Dec 2009
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ahh rite thanks guys, that answers my question


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •