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.


Sign Up Now
> Php Problem
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

<body bgcolor="#000000">

   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: Channel: #UnhandledExceptions
Go to the top of the page
+Quote Post
Start new topic
post Feb 10 2005, 01:14 AM
Post #2

RMS is my Hero

Group: Support Specialist
Posts: 782
Joined: 6-October 02
From: Trichy,INDIA
Member No.: 29

I dont see any forms(data transaction with user),so i doubt that is required.correct me,if i am wrong

But there might be a problem with file permission.Why dont you create a group and make apache and the user, members of that group and then give read access to the group.

Anyway,that is just a suggestion.What errors the script throws?

Try to run the script with php executable,like this....
$php filename.php

and tell us what happens.

Hemant Kumar
user posted image
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: 19th July 2018 - 09:48 PM