php-windows Digest 11 Mar 2003 19:43:28 -0000 Issue 1629

Topics (messages 18962 through 18977):

Re: Newbie attempting file open...
        18962 by: Svensson, B.A.T. (HKG)
        18963 by: Svensson, B.A.T. (HKG)
        18964 by: Luis Moreira
        18970 by: Svensson, B.A.T. (HKG)
        18971 by: Luis Moreira
        18972 by: Svensson, B.A.T. (HKG)

NEW IN GROUP
        18965 by: Guilherme Stolfo

Help with ereg
        18966 by: fLIPIS

foreach with mysql
        18967 by: s.garriock.rgc.aberdeen.sch.uk
        18977 by: Kyle Williamson

A bug with Is_Dir function ?
        18968 by: blackkrusty

Re: IE seems to be more stupid than I spected!
        18969 by: Leonardo Javier Belén

Add slashes saga
        18973 by: Herhuth, Ron
        18976 by: rotsky

testing to see if a file exists in a directory
        18974 by: Herhuth, Ron
        18975 by: Chris Kranz

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
http://www.php.net/manual/en/function.fopen.php

-----Original Message-----
From: William Fisher
To: [EMAIL PROTECTED]
Sent: 2003-03-10 19:54
Subject: [PHP-WIN] Newbie attempting file open...


The Question:  It is my understanding that fopen() using the "r" option
will either open the indicated file for read only OR create one if it
doesn't exist. fopen() is giving me this error when trying to
create/open a file.

Warning: fopen(c:/program files/apache group/apache/htdocs/test.txt)
[function.fopen]: failed to create stream: No such file or directory in
c:\program files\apache group\apache\htdocs\file_open.php on line 5

The Code: What I've written...well...copied... is this:

<?php

 $DOCUMENT_ROOT = $HTTP_SERVER_VARS['DOCUMENT_ROOT'];

 $fp = fopen("$DOCUMENT_ROOT/test.txt" , "r");

?>


The Guts: Windows ME, Apache 1.3.27, PHP 4.3.1. 

Why am I using ME? Call it compulsary. I buy the cheap gas, too. Any
ideas as to why this is happening? What's this whole file streaming
issue?

Blessings,

Zach Fisher....



---------------------------------
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more

--- End Message ---
--- Begin Message ---
You may want to try something like this:

$fp = @fopen(<filename>,"r");

if ($fp)
{
  print"An old file was opened!";

} else  {

 $fp = @fopen(<filename>,"w");
 fclose($fp);
 $fp = @fopen(<filename>,"r");
 print"New file was created!";
}  

-----Original Message-----
From: William Fisher
To: [EMAIL PROTECTED]
Sent: 2003-03-10 19:54
Subject: [PHP-WIN] Newbie attempting file open...


The Question:  It is my understanding that fopen() using the "r" option
will either open the indicated file for read only OR create one if it
doesn't exist. fopen() is giving me this error when trying to
create/open a file.

Warning: fopen(c:/program files/apache group/apache/htdocs/test.txt)
[function.fopen]: failed to create stream: No such file or directory in
c:\program files\apache group\apache\htdocs\file_open.php on line 5

The Code: What I've written...well...copied... is this:

<?php

 $DOCUMENT_ROOT = $HTTP_SERVER_VARS['DOCUMENT_ROOT'];

 $fp = fopen("$DOCUMENT_ROOT/test.txt" , "r");

?>


The Guts: Windows ME, Apache 1.3.27, PHP 4.3.1. 

Why am I using ME? Call it compulsary. I buy the cheap gas, too. Any
ideas as to why this is happening? What's this whole file streaming
issue?

Blessings,

Zach Fisher....



---------------------------------
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more

--- End Message ---
--- Begin Message ---
No need.
It's the other way around, actually.
The option that creates if the the file does not exist is "w". The "r"
option only reads

Luis

----- Original Message -----
From: "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]>
To: "'William Fisher '" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, March 11, 2003 9:15 AM
Subject: RE: [PHP-WIN] Newbie attempting file open...


> You may want to try something like this:
>
> $fp = @fopen(<filename>,"r");
>
> if ($fp)
> {
>   print"An old file was opened!";
>
> } else  {
>
>  $fp = @fopen(<filename>,"w");
>  fclose($fp);
>  $fp = @fopen(<filename>,"r");
>  print"New file was created!";
> }
>
> -----Original Message-----
> From: William Fisher
> To: [EMAIL PROTECTED]
> Sent: 2003-03-10 19:54
> Subject: [PHP-WIN] Newbie attempting file open...
>
>
> The Question:  It is my understanding that fopen() using the "r" option
> will either open the indicated file for read only OR create one if it
> doesn't exist. fopen() is giving me this error when trying to
> create/open a file.
>
> Warning: fopen(c:/program files/apache group/apache/htdocs/test.txt)
> [function.fopen]: failed to create stream: No such file or directory in
> c:\program files\apache group\apache\htdocs\file_open.php on line 5
>
> The Code: What I've written...well...copied... is this:
>
> <?php
>
>  $DOCUMENT_ROOT = $HTTP_SERVER_VARS['DOCUMENT_ROOT'];
>
>  $fp = fopen("$DOCUMENT_ROOT/test.txt" , "r");
>
> ?>
>
>
> The Guts: Windows ME, Apache 1.3.27, PHP 4.3.1.
>
> Why am I using ME? Call it compulsary. I buy the cheap gas, too. Any
> ideas as to why this is happening? What's this whole file streaming
> issue?
>
> Blessings,
>
> Zach Fisher....
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, and more
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


--- End Message ---
--- Begin Message ---
Luis, read the code once again....

-----Original Message-----
From: Luis Moreira
To: 'William Fisher '
Cc: [EMAIL PROTECTED]
Sent: 2003-03-11 12:03
Subject: Re: [PHP-WIN] Newbie attempting file open...

No need.
It's the other way around, actually.
The option that creates if the the file does not exist is "w". The "r"
option only reads

Luis

----- Original Message -----
From: "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]>
To: "'William Fisher '" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, March 11, 2003 9:15 AM
Subject: RE: [PHP-WIN] Newbie attempting file open...


> You may want to try something like this:
>
> $fp = @fopen(<filename>,"r");
>
> if ($fp)
> {
>   print"An old file was opened!";
>
> } else  {
>
>  $fp = @fopen(<filename>,"w");
>  fclose($fp);
>  $fp = @fopen(<filename>,"r");
>  print"New file was created!";
> }
>
> -----Original Message-----
> From: William Fisher
> To: [EMAIL PROTECTED]
> Sent: 2003-03-10 19:54
> Subject: [PHP-WIN] Newbie attempting file open...
>
>
> The Question:  It is my understanding that fopen() using the "r"
option
> will either open the indicated file for read only OR create one if it
> doesn't exist. fopen() is giving me this error when trying to
> create/open a file.
>
> Warning: fopen(c:/program files/apache group/apache/htdocs/test.txt)
> [function.fopen]: failed to create stream: No such file or directory
in
> c:\program files\apache group\apache\htdocs\file_open.php on line 5
>
> The Code: What I've written...well...copied... is this:
>
> <?php
>
>  $DOCUMENT_ROOT = $HTTP_SERVER_VARS['DOCUMENT_ROOT'];
>
>  $fp = fopen("$DOCUMENT_ROOT/test.txt" , "r");
>
> ?>
>
>
> The Guts: Windows ME, Apache 1.3.27, PHP 4.3.1.
>
> Why am I using ME? Call it compulsary. I buy the cheap gas, too. Any
> ideas as to why this is happening? What's this whole file streaming
> issue?
>
> Blessings,
>
> Zach Fisher....
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, and more
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
What for ?

The option "r" stans for "read".

If what William is doing is try to read a file, and then create one if it
doesn't exist, to me that doesn't make sense (sorry).
If the function would do that it would always return an EMPTY file in the
second situation, right ?

Now I ask "why in God's name I want to read an empty file?"

What makes (more) sense is to open a file to write on, with the possibility
to append if it exists or to create a new one if it doesn't.

What you suggest is "open, if it does not exist create".
You get a new (empty) file.
Then what ? Write ? That's what I wanted to say all along

Correct me if I am wrong


Luis

----- Original Message -----
From: "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]>
To: "'Luis Moreira '" <[EMAIL PROTECTED]>; "''William Fisher ' '"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, March 11, 2003 2:00 PM
Subject: RE: [PHP-WIN] Newbie attempting file open...


> Luis, read the code once again....
>
> -----Original Message-----
> From: Luis Moreira
> To: 'William Fisher '
> Cc: [EMAIL PROTECTED]
> Sent: 2003-03-11 12:03
> Subject: Re: [PHP-WIN] Newbie attempting file open...
>
> No need.
> It's the other way around, actually.
> The option that creates if the the file does not exist is "w". The "r"
> option only reads
>
> Luis
>
> ----- Original Message -----
> From: "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]>
> To: "'William Fisher '" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Tuesday, March 11, 2003 9:15 AM
> Subject: RE: [PHP-WIN] Newbie attempting file open...
>
>
> > You may want to try something like this:
> >
> > $fp = @fopen(<filename>,"r");
> >
> > if ($fp)
> > {
> >   print"An old file was opened!";
> >
> > } else  {
> >
> >  $fp = @fopen(<filename>,"w");
> >  fclose($fp);
> >  $fp = @fopen(<filename>,"r");
> >  print"New file was created!";
> > }
> >
> > -----Original Message-----
> > From: William Fisher
> > To: [EMAIL PROTECTED]
> > Sent: 2003-03-10 19:54
> > Subject: [PHP-WIN] Newbie attempting file open...
> >
> >
> > The Question:  It is my understanding that fopen() using the "r"
> option
> > will either open the indicated file for read only OR create one if it
> > doesn't exist. fopen() is giving me this error when trying to
> > create/open a file.
> >
> > Warning: fopen(c:/program files/apache group/apache/htdocs/test.txt)
> > [function.fopen]: failed to create stream: No such file or directory
> in
> > c:\program files\apache group\apache\htdocs\file_open.php on line 5
> >
> > The Code: What I've written...well...copied... is this:
> >
> > <?php
> >
> >  $DOCUMENT_ROOT = $HTTP_SERVER_VARS['DOCUMENT_ROOT'];
> >
> >  $fp = fopen("$DOCUMENT_ROOT/test.txt" , "r");
> >
> > ?>
> >
> >
> > The Guts: Windows ME, Apache 1.3.27, PHP 4.3.1.
> >
> > Why am I using ME? Call it compulsary. I buy the cheap gas, too. Any
> > ideas as to why this is happening? What's this whole file streaming
> > issue?
> >
> > Blessings,
> >
> > Zach Fisher....
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Tax Center - forms, calculators, tips, and more
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


--- End Message ---
--- Begin Message ---
Hi Louis,

As you mihgt know, the "macro-function" I wrote is know as
"create-open".

I do understand your point about "why would I like to
read from an empty file?". Indeed this might seams strange,
but if one think twice about it, it might not be that bad
after all with a create open function.

Some higher level functions might assumes the existens of
a certain file, and if it does not excisit then these function
will fail (this fault is more commeon than one would belive is
true). For example a utility reading a log file might fail
if the log file is not present.

However a presence of an empty log file will be, from an
information point of view, as informative as a populated;
the empty file will namley tell (under normal condition)
that nothing special have happend. However a none existing
log file, might, casue program failures. And we don't want
that; especialy not in sattelite launch system, don't we?

However, I asked you to read it again, becuase your original
remark on my message was a tatotlogy in natural languages
on what I wrote in code form. 

Kind regards,

          //Anders

-----Original Message-----
From: Luis Moreira
To: Svensson, B.A.T. (HKG); ''William Fisher ' '
Cc: [EMAIL PROTECTED]
Sent: 2003-03-11 15:42
Subject: Re: [PHP-WIN] Newbie attempting file open...

What for ?

The option "r" stans for "read".

If what William is doing is try to read a file, and then create one if
it doesn't exist, to me that doesn't make sense (sorry).
If the function would do that it would always return an EMPTY file in
the second situation, right ?

Now I ask "why in God's name I want to read an empty file?"

What makes (more) sense is to open a file to write on, with the
possibility
to append if it exists or to create a new one if it doesn't.

What you suggest is "open, if it does not exist create".
You get a new (empty) file.
Then what ? Write ? That's what I wanted to say all along

Correct me if I am wrong


Luis

----- Original Message -----
From: "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]>
To: "'Luis Moreira '" <[EMAIL PROTECTED]>; "''William Fisher ' '"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, March 11, 2003 2:00 PM
Subject: RE: [PHP-WIN] Newbie attempting file open...


> Luis, read the code once again....
>
> -----Original Message-----
> From: Luis Moreira
> To: 'William Fisher '
> Cc: [EMAIL PROTECTED]
> Sent: 2003-03-11 12:03
> Subject: Re: [PHP-WIN] Newbie attempting file open...
>
> No need.
> It's the other way around, actually.
> The option that creates if the the file does not exist is "w". The "r"
> option only reads
>
> Luis
>
> ----- Original Message -----
> From: "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]>
> To: "'William Fisher '" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Tuesday, March 11, 2003 9:15 AM
> Subject: RE: [PHP-WIN] Newbie attempting file open...
>
>
> > You may want to try something like this:
> >
> > $fp = @fopen(<filename>,"r");
> >
> > if ($fp)
> > {
> >   print"An old file was opened!";
> >
> > } else  {
> >
> >  $fp = @fopen(<filename>,"w");
> >  fclose($fp);
> >  $fp = @fopen(<filename>,"r");
> >  print"New file was created!";
> > }
> >
> > -----Original Message-----
> > From: William Fisher
> > To: [EMAIL PROTECTED]
> > Sent: 2003-03-10 19:54
> > Subject: [PHP-WIN] Newbie attempting file open...
> >
> >
> > The Question:  It is my understanding that fopen() using the "r"
> option
> > will either open the indicated file for read only OR create one if
it
> > doesn't exist. fopen() is giving me this error when trying to
> > create/open a file.
> >
> > Warning: fopen(c:/program files/apache group/apache/htdocs/test.txt)
> > [function.fopen]: failed to create stream: No such file or directory
> in
> > c:\program files\apache group\apache\htdocs\file_open.php on line 5
> >
> > The Code: What I've written...well...copied... is this:
> >
> > <?php
> >
> >  $DOCUMENT_ROOT = $HTTP_SERVER_VARS['DOCUMENT_ROOT'];
> >
> >  $fp = fopen("$DOCUMENT_ROOT/test.txt" , "r");
> >
> > ?>
> >
> >
> > The Guts: Windows ME, Apache 1.3.27, PHP 4.3.1.
> >
> > Why am I using ME? Call it compulsary. I buy the cheap gas, too. Any
> > ideas as to why this is happening? What's this whole file streaming
> > issue?
> >
> > Blessings,
> >
> > Zach Fisher....
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Tax Center - forms, calculators, tips, and more
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message --- hi Personal of the list,
I am Brazilian and I added in this list I expect to help you. It has alguem Brazilian?


[ ]s,
Guilherme Luiz Stolfo
Programmer - Design
College Adventista
TEL.: 5822-6166 R:5273
MSN.: [EMAIL PROTECTED]



_________________________________________________________________
MSN Hotmail, o maior webmail do Brasil.  http://www.hotmail.com


--- End Message ---
--- Begin Message ---
Hi all. I'm trying to deal with Regular Expressions, but somehow it is
getting more difficult. I´m trying to do the folowing:

Read a text and get all of the PHP code out of it, highlight it and then
print all in nice HTML. I'm using this to get the PHP code:

ereg("<\?.*\?>",$Text,$PHP_code);

It works, yeah, but on a situation like this:

<?
    echo "aaaa";
?>
This is some other no php code
<?
    echo "this is PHP";
?>



--- End Message ---
--- Begin Message ---
Hi
I am trying to use a FOREACH command to go through a mysql result with 2
columns.
They are ID and name
I need the name one the ID one is just for referrence.
Anyone got the syntax for it?

Thanks tons
>From Shaun Garriock 
RGC Webmaster 

*** The contents of this message are confidential and are intended for the addressee 
only. The views expressed in this message do not necessarily represent those of Robert 
Gordon's College. Electronic mail transmission is not guaranteed to be secure, 
therefore, Robert Gordon's College does not accept liability for the contents of this 
transmission. This message does not form a legal binding contract. ***


--- End Message ---
--- Begin Message ---
Why a foreach?

while($row = mysql_fetch_array($result)) {
  echo "$row[name]";
}

>===== Original Message From <[EMAIL PROTECTED]> =====
>Hi
>I am trying to use a FOREACH command to go through a mysql result with 2
>columns.
>They are ID and name
>I need the name one the ID one is just for referrence.
>Anyone got the syntax for it?
>
>Thanks tons
>From Shaun Garriock
>RGC Webmaster
>
>*** The contents of this message are confidential and are intended for the 
addressee only. The views expressed in this message do not necessarily 
represent those of Robert Gordon's College. Electronic mail transmission is 
not guaranteed to be secure, therefore, Robert Gordon's College does not 
accept liability for the contents of this transmission. This message does not 
form a legal binding contract. ***
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

==

Kyle Williamson
Solent Educational

Tel: (023) 80 848319 Fax: (023) 80 848715


--- End Message ---
--- Begin Message ---
Hi,
I have a serious problem (bug ?) in my sript. Let see it :

The goal of my sript is opening a folder and display it (very common).
My sript receive a path called '$path' by POST method when starting. 

**************************
$path=$_POST['path']; 
**************************

$path is a correct folder on my computer.
I can check the value of path in my script like that :

*************************************
echo "<br> path's value is :".$path;   --> The result is OK -->
C:/phpdev/www/public
*************************************

But when i try theses functions : 

*************************
echo is_dir($path);       --> the result is 0 (bad)
$handle = opendir($path); --> make an error (path is not a folder). 
*************************

So at this moment, you say ok, my path's syntax is wrong or my folder
doesn't exist ? BUT if i put on the top of my sript this code (with the
absolutly same path ! ):

******************************
$path="C:/phpdev/www/public"
********************************

The sript works fine and i have no error !

So i don't understand where is the problem. If you know what is the
problem, Plese help !! I did not find any answer anywhere.... I'm using
phpdev5 (php 4.2.3) thanks in advance ! Yohan

--- End Message ---
--- Begin Message ---
It is really odd but it's true. It seems that IE cannot handle properly the
information sent. Has anyone made it work fine?. Leo. AFIP AR
----- Original Message -----
From: "H Marc Bower" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 10, 2003 12:49 PM
Subject: Re: [PHP-WIN] IE seems to be more stupid than I spected!


> Does it work with Netscape?  I find it odd that the browser would have
> anything to do with this, really.
>
> (V)
>
> ----- Original Message -----
> From: "Leonardo Javier Belén" <[EMAIL PROTECTED]>
>
>
> HI all!
>     I am facing a problem thanks to the so-called powerful IE on Windows.
> I'm trying to generate PDFs on the fly but IE refuses to open the file.
Not
> mention that I cannot ask for implace activation. I tried all the stuff
> around but I get always the same thing. "The file is not longer available"
> (sorry about the translation but Im using a Spanish version). Has somebody
> found a work around for this matter. Thanks in advance. Leo. AFIP AR.
>
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
I'm running into the old add slashes problem and I'm hoping someone might be nice 
enough to help me out.

I created a form that lists all the last names in a database.  Beside each name I have 
a checkbox which contains a value of their last name and because the user might select 
multiple names, I am assigning the values to an array (i.e. ...name="chkbox[]" 
value=O'brien...). I have the form set to pass the select values via a POST, with 
Register Globals OFF.

On the following page I am printing out the selected names and in the example above 
(O'brien) the script only prints out "O" I lose the "'brien" which is problematic.  I 
looked at the manual but I find it to be rather confusing on this point.

What code can I put in place to help alleviate this problem?

Thanks in advance!
Ron


--- End Message ---
--- Begin Message ---
I've just been through this! Let's say that your variable containing the
name is $lastname, using the following when setting up a form to pass values
by POST worked for me:

   blah...blah...name='lastname' value
='".htmlentities(stripslashes($lastname))."'>..... etc etc

I actually have a page where that variable is treated to stripslashes twice
without the string being manipulated or called in any way in between, and
yet it seems to need both instances. Don't ask me why or I'll start to
whimper...

Anyway, that's a starting point

"Ron Herhuth" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

I'm running into the old add slashes problem and I'm hoping someone might be
nice enough to help me out.

I created a form that lists all the last names in a database.  Beside each
name I have a checkbox which contains a value of their last name and because
the user might select multiple names, I am assigning the values to an array
(i.e. ...name="chkbox[]" value=O'brien...). I have the form set to pass the
select values via a POST, with Register Globals OFF.

On the following page I am printing out the selected names and in the
example above (O'brien) the script only prints out "O" I lose the "'brien"
which is problematic.  I looked at the manual but I find it to be rather
confusing on this point.

What code can I put in place to help alleviate this problem?

Thanks in advance!
Ron



--- End Message ---
--- Begin Message ---
How can I check to see if a PDF file exists in a directory on my web server?

Thanks,
Ron

--- End Message ---
--- Begin Message ---
$path_to_file = "http://www.yourwebsite.com/pdf/this_file.pdf;
If( file_exists( $path_to_file ) )
{
        //do stuff
}

chris kranz
fatcuban.com
 


-----Original Message-----
From: Herhuth, Ron [mailto:[EMAIL PROTECTED] 
Sent: 11 March 2003 16:43
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] testing to see if a file exists in a directory



How can I check to see if a PDF file exists in a directory on my web
server?

Thanks,
Ron

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--- End Message ---

Reply via email to