i run 4.3.4
but is_dir doesn't work always.
when i put a counter in a readdir loop, it returns the number 5
that is;
..
...
test1
test2
test3
those are testdirectorys, but when i do a is_dir on the test directory it
doesn't return true!
is this just a bug in 4.3.4 ?
do i need to compile a new version or is there another directory check
function?
bart 5 4950
On Sun, 14 Mar 2004 23:50:14 +0100, "bart" <ba**@thatissec ret.nlm> wrote: i run 4.3.4
but is_dir doesn't work always.
when i put a counter in a readdir loop, it returns the number 5
that is;
. .. test1 test2 test3
those are testdirectorys, but when i do a is_dir on the test directory it doesn't return true!
is this just a bug in 4.3.4 ?
Can't say based on the lack of information you've posted. It's far, far more
likely that there's a bug in your code, rather than a simple function like
is_dir(), used by thousands of people, returns the wrong results. Maybe there
is a bug in is_dir(), it's not impossible, but I'd bet the problem lies
elsewhere.
Show your code.
Show a short runnable testcase.
Show some proof that the names above actually are directories.
etc.
--
Andy Hassall <an**@andyh.co. uk> / Space: disk usage analysis tool
<http://www.andyh.co.uk > / <http://www.andyhsoftwa re.co.uk/space>
*sigh* Another newbie blaming PHP for his own bug... You probably didn't
append the parent path to the parameter to is_dir(). readdir() doesn't
return the full path, just the name of the folder. Use glob() instead, it's
easier to use.
Uzytkownik "bart" <ba**@thatissec ret.nlm> napisal w wiadomosci
news:40******** *************@n ews.xs4all.nl.. . i run 4.3.4
but is_dir doesn't work always.
when i put a counter in a readdir loop, it returns the number 5
that is;
. .. test1 test2 test3
those are testdirectorys, but when i do a is_dir on the test directory it doesn't return true!
is this just a bug in 4.3.4 ?
do i need to compile a new version or is there another directory check function?
bart
you are right,
thank you for helping me, that was indeed the problem.
next time i should go to bed when it gets late and i start to get tired...
(or drink more coffee)
bye now
"Chung Leong" <ch***********@ hotmail.com> wrote in message
news:Zb******** ************@co mcast.com... *sigh* Another newbie blaming PHP for his own bug... You probably didn't append the parent path to the parameter to is_dir(). readdir() doesn't return the full path, just the name of the folder. Use glob() instead,
it's easier to use.
you are all right, it was my fault !
thanks for replying ...
grtx,
Bart
"Andy Hassall" <an**@andyh.co. uk> wrote in message
news:88******** *************** *********@4ax.c om... On Sun, 14 Mar 2004 23:50:14 +0100, "bart" <ba**@thatissec ret.nlm> wrote: Can't say based on the lack of information you've posted. It's far, far
more likely that there's a bug in your code, rather than a simple function like is_dir(), used by thousands of people, returns the wrong results. Maybe
there is a bug in is_dir(), it's not impossible, but I'd bet the problem lies elsewhere.
Show your code. Show a short runnable testcase. Show some proof that the names above actually are directories. etc. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: lawrence |
last post by:
In the function below, before I open the directory I first test to
make sure the address I have is, in fact, a directory. This function
was working fine on one web server running FreeBSD and PHP 4.06.
However, today I'm trying to run this software on a new server (RH
Linux 9, PHP 4.2.3) and the directory is failing the is_dir() test.
The error message that I have in my code is printing out this error:
In getListOfAnyDirectory(), we...
|
by: ravenslay3r |
last post by:
I'm using a script to grab images from a directory and put them to the
screen, but i want it to ignore sub-directories like CVS/ . Adding the
tag "&& !is_dir($file)" to the correct conditional statement solved it
on my test server, but not on the actual site.
How is this possible? How can I fix it?
thanks,
|
by: Peter Olcott |
last post by:
www.halting-problem.com
|
by: Jon Davis |
last post by:
If I have a class with a virtual method, and a child class that overrides
the virtual method, and then I create an instance of the child class AS A
base class...
BaseClass bc = new ChildClass();
.... and then call the virtual method, why is it that the base class's method
is called instead of the overridden method? How do I fix this if I don't
know at runtime what the child class is? I'm using
Activator.CreateInstance() to load the...
|
by: Ammar |
last post by:
Dear All,
I'm facing a small problem.
I have a portal web site, that contains articles, for each article, the end
user can send a comment about the article.
The problem is:
I the comment length is more that 1249 bytes, then the progress bar of the
browser will move too slow and then displaying that the page not found!!!!
If the message is less than or equal to 1249 then no problem.
| |
by: Dany |
last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by Microsoft must be installed on their servers.
Now german Umlaute (ä, ü, ö) and quotes are returned incorrectly in SOAP fault responses.
This can be easily verified:
Implement the following in a web service method (just raises a SOAPException with a...
|
by: Juby |
last post by:
I'm creating a script for our website which will function as something
of a docment manager. The backend features an option to create a new
directory in the uploads subdirectory. The problem is, once I've used
mkdir() to create this file, when I later run is_dir() on the filename,
I get 'false'. Even worse, if I run is_file() on the new directories,
I get false as well. The same thing seems to be happening to files I
submit via the...
|
by: comp.lang.php |
last post by:
Env:
Windows XP, Apache 1.33, PHP 5.2.0
<?
echo is_dir($_SERVER) . " for dir = " .
$_SERVER);
?>
|
by: ndlarsen |
last post by:
Hello.
I have a minor issue with is_dir(). When running two almost identical
scripts from two different directories with same target directory I get
different output. The only difference between the scripts is a variable
containing the path to the target directory.
The scripts are located here:
http://ionline.dk/test/test1.php
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |