Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Member webmastercorey's Avatar
    Join Date
    Nov 2005
    Location
    Kansas
    Posts
    49
    Member #
    11909
    Does anyone know a PHP script that would allow me to show or hide a certain included PHP file.

    This is a bad exampble but something like this:



    Show The File <-Click on this and it displays this:

    <? php
    include ('thefile.php');
    ?>


    Thanks in advance,
    Corey
    "What good will it be for a man if he gains the whole world, yet forfeits his soul?"
    -Matthew 16:26

  2.  

  3. #2
    Junior Member
    Join Date
    Jul 2006
    Posts
    1
    Member #
    13623
    Wrong technology. PHP is server side so unless that was a link, or JAVASCRIPT related, you can't do anything.

    Since PHP is server side unless that is a link to another page you can't do that, what you CAN do is use AJAX to request another file on the server behind the scenes to include that and display it in place.

  4. #3
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    You could use a GET variable, and if its set to yes, or true, or 1, whatever, then include the file, else, do not include.

    PHP Code:
    if($_GET['sf'] == "yes"// sf = show file. maybe not even check it's value, instead just check if it is set..
     
    {
      include(
    "file.extension");
     } 

  5. #4
    Senior Member simpleurl's Avatar
    Join Date
    Jul 2006
    Location
    Leicester, UK.
    Posts
    150
    Member #
    13598
    or you could use CHMOD in your server and set certain files... certain permissions

  6. #5
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    How does setting permissions solve the posters question?

    That would mean having to change the permissions regularly.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:44 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com