Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
> Php Problem
Termina
post Feb 7 2005, 02:50 PM
Post #1


RMS is my Hero
******

Group: Support Specialist
Posts: 862
Joined: 18-February 04
From: Wisconsin
Member No.: 2,404



This script used to work (and IIRC) I havn't changed anything.

Then again, I havn't tried/looked at this script in months.

Anyone see anything wrong?

Description: Gets the foldernames from /home, and shows them as a link, as well as the contents of their .plan file

Permissions of /home = 755
all folders in /home are = 705
owner = username of folder
group that owns each = users

CODE
<body bgcolor="#000000">
<CENTER>
<?

   include("layout.php");
   function add_page_content() {
   $hubDir = '/home';
   foreach(glob("$hubDir/*") as $filename)
{
   if( is_dir($filename) && is_file("$filename/.plan") )
   {
       $username = explode("/",$filename);
       $username = $username[count($username)-1];
       $filedata = file_get_contents("$filename/.plan");
       echo "<a href="~{$username}/">$username</a><br />$filedata<br /><br />";
   }
}
?>

<? } //End ?>


--------------------
*Points finger at the author above him* They're a witch! Burn them!
---
Vist my website!
Join me in IRC! Server: st0rage.org Channel: #UnhandledExceptions
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
DS2K3
post Feb 7 2005, 03:04 PM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,284
Joined: 14-November 04
From: Southampton, Hampshire
Member No.: 4,165



Could be that you dont have register_globals turned on - in which case any GET or POST data will obly be present in the superglobals.

What version of PHP are you using?


--------------------
Fixed your problem? Let us know!
richard@linuxhelp.net

www.Gathr.co.uk Online Event Management
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 15th December 2017 - 07:20 AM