Results 1 to 5 of 5

Thread: PHP scripting help (URGENT)

  1. #1
    Join Date
    Mar 2006
    Posts
    600
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Default PHP scripting help (URGENT)

    PHP Code:
    <?php
    if ($_GET['file'])
    {
    highlight_file($_SERVER['SCRIPT_FILENAME']);
    exit();
    }
    ?>
    How do i make it where i input the filename into the source instead of the page i am on?

    Edit>
    when i go to server.com/source.php?file=filename.php
    This is how I want it not like when i go to server.com/source.php?file=1 and it shows the current page.
    Last edited by benslayton; 02-03-2007 at 12:51 AM. Reason: Add

  2. #2
    Join Date
    Mar 2006
    Posts
    600
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Default

    guys I really need help. This is really important.

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Um... highlight_file($_GET['file'])? I'm not entirely sure what you're asking.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Apr 2006
    Posts
    190
    Thanks
    3
    Thanked 7 Times in 7 Posts

    Default

    The PHP.net website has a great tool hidden at the bottom of there site that allows you to see the PHP source. Like this for examples shows the Source of there homepage index.php

    http://www.php.net/source.php?url=/index.php

    The following page shows you the source code for source.php mentioned in the url scheme of the above address.

    http://www.php.net/source.php?url=/source.php

    Perhaps theres something there that can help you understand what you are trying to do.
    Last edited by NXArmada; 02-05-2007 at 06:58 PM.
    Ryan
    Sevierville, TN

  5. #5
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    Well...I think this is a really bad idea, but here you go
    PHP Code:
    <?php
    if ($_GET['file'])
    {
    highlight_file($_GET['file']);
    exit();
    }
    ?>
    I take no responsibility if you use this code. It is very,very dangerous.

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
  •