473,396 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to prevent the display of these 'dots' with opendir function?

106 100+
Hi
I'm using opendir to show a list of files and folders.

Here's some of the code:
Expand|Select|Wrap|Line Numbers
  1. $maindir = "./";
  2. $subdir = $_GET['sub'];
  3. $dir = $maindir.$subdir;
  4. $dh = opendir($dir);
And then I put the files and folders in a table.

The problem is, as the manual page about opendir example 1 shows, it adds to rows on the top of the table:
. and
..
which are the top level directories.

But I don't want to have that so the users can't go the top directories! How can I prevent the display of that?

thanks.
Sep 5 '10 #1
1 3063
londres9b
106 100+
I got the answer. It's in the manual! http://php.net/readdir.
Sep 5 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Roswitha Schoppe-Jantzen | last post by:
Hi, I want to get all files, that exist in a specific url. I use the opendir and readdir-function - It ist all right, when I use directories like "." or "./test". But I want to use a directory...
3
by: Jeremy Shovan | last post by:
What do I need to change to use the opendir() function when safe mode is in affect?? I have root access to the server and can make any changes neccessary except turn safe mode off Thanks in...
2
by: Andrew | last post by:
I'm trying to learn how to use the opendir() function with perl, and each time I try to run my perl script I keep getting "Permission denied". Here is the script: open (DIR,...
3
by: Aristotle | last post by:
Could you please help me out with regular expressions. I'm trying to write a perl script that proccesses some text, and i'm stuck at the following: need to remove from the text 1. dots followed...
4
by: gnah | last post by:
Greetings, I hope my problem is easy to fix, I'm pretty new with php - but I am getting weird results with the opendir() function. It may just be a path problem, but I don't see which variable...
38
by: MLH | last post by:
I have 2 global constants declared in the same global module: Global Const MY_VERSION$ = "1.04" Global Const ProjectName$ = "MyProj" I have 2 global procedures designed to return the value of...
3
by: Steve - DND | last post by:
I was wondering if anyone can point me to some articles or practices they use for dealing with errors in their applications; particularly in an n-tier design. I am trying to find one way to...
8
by: ifrst | last post by:
What's the defrrence between these(sub,procedure,function,private) and when i use them Als i know it can be function ,sub or procedure Public or private so what does it mean Private only such as...
2
by: David++ | last post by:
Hi folks, Just been having a play with my .net server space and have added a few basic web forms and a couple of web services. I noticed that when I return double precision values from the...
1
by: =?Utf-8?B?YWxwbzQ4Ng==?= | last post by:
when I create a text file with: wmic ntdomain get /value z:\test\test.txt then run findstr /i /r ".*" z:\test\test.txt The output has a dot between each character. Is there any way to...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.