The following code:
$new_file =
ADS_DIR_INTERNAL.'/'.$ad_info['id'].'_'.$ad_info['filename'];
echo "NEW_FILE:[".$new_file."]\n";
echo "file_exists Using
VAR:[".file_exists($new_file)."]\n";
echo "file
> -Original Message-
> From: Boyd, Todd M. [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 10, 2008 8:28 AM
> To: php-general@lists.php.net
> Subject: RE: Re: [PHP] file_exists and wildcard/regex
>
> FWIW, I would probably do the file search like this (UNTESTE
> -Original Message-
> From: Per Jessen [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 10, 2008 1:43 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] file_exists and wildcard/regex
>
> Ashley Sheridan wrote:
>
> > If you're on a Linux s
Ashley Sheridan wrote:
> If you're on a Linux system, you could look at ls and the regular
> expressions it lets you use with it. You could exec out and get the
> returned results. Also, as it's a system call, it should be very
> speedy.
'ls' is just a plain binary (/bin/ls), not a system call.
[EMAIL PROTECTED] wrote:
>
> I'm not sure how glob works in the guts, but I know it is dog-slow for
> large numbers of files (or maybe just large numbers of results).
>
I'm not sure what the context of this was, but the speed of searching a
directory with a large number of files, e.g. 100,000s,
I'm not sure how glob works in the guts, but I know it is dog-slow for large
numbers of files (or maybe just large numbers of results).
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, 2008-12-09 at 12:54 -1000, Daniel Kolbo wrote:
>
> Daniel Kolbo wrote:
> > What is the preferred method with php to test and see if a file
> > [pattern] exists?
> >
> > For example, i only need to search in one directory, that may have any
> > number of files named such as afile1.txt, af
Daniel Kolbo wrote:
What is the preferred method with php to test and see if a file
[pattern] exists?
For example, i only need to search in one directory, that may have any
number of files named such as afile1.txt, afile2.txt, afile3.txt,
And also, bfile1.txt, bfile2.txt, bfile3.txt,
On 9 Dec 2008, at 22:26, Daniel Kolbo wrote:
What is the preferred method with php to test and see if a file
[pattern] exists?
For example, i only need to search in one directory, that may have
any number of files named such as afile1.txt, afile2.txt,
afile3.txt, And also, bfile1.txt
What is the preferred method with php to test and see if a file
[pattern] exists?
For example, i only need to search in one directory, that may have any
number of files named such as afile1.txt, afile2.txt, afile3.txt,
And also, bfile1.txt, bfile2.txt, bfile3.txt, ...
I want to see if an
Stan wrote:
The script is running on an UBUNTU v8.04 LAMP server. Case is
supposed to matter, isn't it?
out of interest try putting clearstatcache() before
if(!file_Exists($basePicture))
ps.. sure it should be file_exists all lowercase - perhaps you're
choosing to use call the function wit
On Sun, 2008-11-23 at 12:24 -0500, Craige Leeder wrote:
> Stan wrote:
> > If $basePicture = "../pictures/2008 west coast trip/2008-06-10 first week at
> > Chris'/DSC_0011.jpg"
> > and the file actually is "../pictures/2008 west coast trip/2008-06-10 first
> > week at Chris'/DSC_0011.JPG"
> > (upper
Stan wrote:
If $basePicture = "../pictures/2008 west coast trip/2008-06-10 first week at
Chris'/DSC_0011.jpg"
and the file actually is "../pictures/2008 west coast trip/2008-06-10 first
week at Chris'/DSC_0011.JPG"
(uppercase extension) the following snippet of code
--
If $basePicture = "../pictures/2008 west coast trip/2008-06-10 first week at
Chris'/DSC_0011.jpg"
and the file actually is "../pictures/2008 west coast trip/2008-06-10 first
week at Chris'/DSC_0011.JPG"
(uppercase extension) the following snippet of code
-:- -Original Message-
-:- From: Chris [mailto:[EMAIL PROTECTED]
-:- Sent: Monday, August 25, 2008 9:49 AM
-:- To: Chris Haensel
-:- Cc: php-general@lists.php.net
-:- Subject: Re: [PHP] file_exists() not working correctly?
-:-
-:-
-:- > That worked like a charm. Now, can you t
-:- -Original Message-
-:- From: Chris [mailto:[EMAIL PROTECTED]
-:- Sent: Monday, August 25, 2008 9:25 AM
-:- To: Chris Haensel
-:- Cc: php-general@lists.php.net
-:- Subject: Re: [PHP] file_exists() not working correctly?
-:-
-:- Chris Haensel wrote:
-:- > Good morning l
Chris Haensel wrote:
> That worked like a charm. Now, can you tell me why that exact same
> function works with a relative path on another server and with a "full
> path only" on this server? I am glad that it works, but would also
> like to understand why
Check the working directory as well as t
That worked like a charm. Now, can you tell me why that exact same function
works with a relative path on another server and with a "full path only" on
this server? I am glad that it works, but would also like to understand why
:o)
Could be different document roots for apache, different enviro
Chris schrieb:
Chris Haensel wrote:
Good morning list,
I have a _very_ simple function... it is as follows
/**/
function getgalimage($fzg) {
$folder="bilder";
$imgname=$fzg."_1.JPG";
$checkimg=$folder."/".$img
Chris Haensel wrote:
Good morning list,
I have a _very_ simple function... it is as follows
/**/
function getgalimage($fzg) {
$folder = "bilder";
$imgname= $fzg."_1.JPG";
$checkimg = $fo
Good morning list,
I have a _very_ simple function... it is as follows
/**/
function getgalimage($fzg) {
$folder = "bilder";
$imgname= $fzg."_1.JPG";
$checkimg = $folder."/".$imgname;
At 11:06 PM + 11/15/07, Stut wrote:
The realpath function will reduce your definition of $page to
"/home/evil-user-home-dir/evil-payload.php"
$expecteddir is set to "/home/stut/phpstuff/inc"
The if takes the first strlen($expecteddir) characters of the
reduced $page and compares it to $ex
At 2:45 PM + 11/16/07, Stut wrote:
It also worth noting that what you're doing there is quite
inefficient. I have a similar arrangement where I have a directory
containing the include files, but I locate it in a different way.
Most sites I deal with have an auto-prepended file containing (a
tedd wrote:
At 11:06 PM + 11/15/07, Stut wrote:
The realpath function will reduce your definition of $page to
"/home/evil-user-home-dir/evil-payload.php"
$expecteddir is set to "/home/stut/phpstuff/inc"
The if takes the first strlen($expecteddir) characters of the reduced
$page and compa
Instruct ICC wrote:
Something like the following would be much better (untested)...
$page = realpath(dirname(__FILE__).'/inc/'.$_GET['page'].'.php');
$expecteddir = realpath(dirname(__FILE__).'/inc');
if (substr($page, 0, strlen($expecteddir)) != $expecteddir)
{
// Ideally return a 403 stat
> >> Something like the following would be much better (untested)...
> >>
> >> $page = realpath(dirname(__FILE__).'/inc/'.$_GET['page'].'.php');
> >> $expecteddir = realpath(dirname(__FILE__).'/inc');
> >> if (substr($page, 0, strlen($expecteddir)) != $expecteddir)
> >> {
> >> // Ideally retu
> My server is down right now so I can't do my usual example script.
A likely story.
Just kidding.
Stut, YOU WERE RIGHT, AND I WAS WRONG.
Your code is golden.
_
Help yourself to FREE treats served up daily at the Messenger Café. S
Instruct ICC wrote:
Date: Thu, 15 Nov 2007 13:16:46 +
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
CC: php-general@lists.php.net
Subject: Re: [PHP] file_exists
Instruct ICC wrote:
Date: Thu, 15 Nov 2007 00:20:52 +
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
CC: php-general
Instruct ICC wrote:
No, you've missed the point. $expecteddir is a fixed variable that you,
the script author, specify. It does not contain anything coming from
external veriables. You then compare the full path you build from the
external variables to $expecteddir to verify that the file is in
> >> No, you've missed the point. $expecteddir is a fixed variable that you,
> >> the script author, specify. It does not contain anything coming from
> >> external veriables. You then compare the full path you build from the
> >> external variables to $expecteddir to verify that the file is in
> Date: Thu, 15 Nov 2007 13:16:46 +
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> CC: php-general@lists.php.net
> Subject: Re: [PHP] file_exists
>
> Instruct ICC wrote:
> >
> >
> >> Date: Thu, 15 Nov 2007 00:20:52 +
> >>
On Nov 15, 2007 7:16 AM, Stut <[EMAIL PROTECTED]> wrote:
> Instruct ICC wrote:
> >
> >
> >> Date: Thu, 15 Nov 2007 00:20:52 +
> >> From: [EMAIL PROTECTED]
> >> To: [EMAIL PROTECTED]
> >> CC: php-general@lists.php.net
> >&
Instruct ICC wrote:
Date: Thu, 15 Nov 2007 00:20:52 +
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
CC: php-general@lists.php.net
Subject: Re: [PHP] file_exists
Philip Thompson wrote:
I've run into similar problems where I *thought* I was looking in the
correct location... but I w
Ronald Wiplinger wrote:
Stut wrote:
Philip Thompson wrote:
I've run into similar problems where I *thought* I was looking in the
correct location... but I wasn't. Take this for example
I really hope this is not a piece of production code. If it is then
you might want to th
Instruct ICC wrote:
>
>
> Called like this?
>
> index.php?page=http://evil-hacker-site.com/evil-payload.php
>
> And the browser will probably url_encode for me if needed.
> _
> Climb to the top of the charts! Play Star Shuffle: the w
Stut wrote:
> Philip Thompson wrote:
>> I've run into similar problems where I *thought* I was looking in the
>> correct location... but I wasn't. Take this for example
>>
>> > $page = $_GET['page'];
>> if (file_exists ("$page.php")) {
>> include ("$page.php");
>> }
>> ?>
>
> I really hope
> Date: Thu, 15 Nov 2007 00:20:52 +
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> CC: php-general@lists.php.net
> Subject: Re: [PHP] file_exists
>
> Philip Thompson wrote:
>> I've run into similar problems where I *thought* I was looking in the
>
Philip Thompson wrote:
I've run into similar problems where I *thought* I was looking in the
correct location... but I wasn't. Take this for example
I really hope this is not a piece of production code. If it is then you
might want to think very hard about what it's doing. If you still c
> >>> if (file_exists('/srv/www/../images/pic412.jpg') {
Two left parens, one right, surprised you don't get a syntax error?
Warren Vail
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Nov 14, 2007 5:04 PM, Chris <[EMAIL PROTECTED]> wrote:
> Ronald Wiplinger wrote:
> > Chris wrote:
> >> Ronald Wiplinger wrote:
> >>> I am having troubles with the function file_exists()
> >>>
> >>> I tried the full path like:
> >>>
> >>> if (file_exists('/srv/www/../images/pic412.jpg') {
>
Ronald Wiplinger wrote:
Chris wrote:
Ronald Wiplinger wrote:
I am having troubles with the function file_exists()
I tried the full path like:
if (file_exists('/srv/www/../images/pic412.jpg') {
echo "";
} else {
echo " " //picture is missing!
}
No matter if
Chris wrote:
> Ronald Wiplinger wrote:
>> I am having troubles with the function file_exists()
>>
>> I tried the full path like:
>>
>> if (file_exists('/srv/www/../images/pic412.jpg') {
>> echo "";
>> } else {
>> echo " " //picture is missing!
>> }
>>
>> No matter
Ronald Wiplinger wrote:
I am having troubles with the function file_exists()
I tried the full path like:
if (file_exists('/srv/www/../images/pic412.jpg') {
echo "";
} else {
echo " " //picture is missing!
}
No matter if I use the full path or just images/pic4
Ronald Wiplinger wrote:
I am having troubles with the function file_exists()
I tried the full path like:
you are missing a closing parenthesis on your condition
if (file_exists('/srv/www/../images/pic412.jpg') ) {
if (file_exists('/srv/www/../images/pic412.jpg') {
echo "";
} e
I am having troubles with the function file_exists()
I tried the full path like:
if (file_exists('/srv/www/../images/pic412.jpg') {
echo "";
} else {
echo " " //picture is missing!
}
No matter if I use the full path or just images/pic412.jpg, it always
shows th
On 10/24/07, Jim Lucas <[EMAIL PROTECTED]> wrote:
> Daniel Brown wrote:
> > On 10/24/07, Manuel Vacelet <[EMAIL PROTECTED]> wrote:
> >> Hi all,
> >>
> >> file_exists and is_readable perfom there test with real UID/GID.
> >> Is there any functions that tests file existance with effective UID/GID ?
>
Daniel Brown wrote:
On 10/24/07, Manuel Vacelet <[EMAIL PROTECTED]> wrote:
Hi all,
file_exists and is_readable perfom there test with real UID/GID.
Is there any functions that tests file existance with effective UID/GID ?
Note: stat is not an option because it raises an E_WARNING if the file
i
On 10/24/07, Manuel Vacelet <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> file_exists and is_readable perfom there test with real UID/GID.
> Is there any functions that tests file existance with effective UID/GID ?
>
> Note: stat is not an option because it raises an E_WARNING if the file
> is not reada
Hi all,
file_exists and is_readable perfom there test with real UID/GID.
Is there any functions that tests file existance with effective UID/GID ?
Note: stat is not an option because it raises an E_WARNING if the file
is not readable.
Thanks,
Manuel
--
PHP General Mailing List (http://www.php.
On 6/18/07, Jim Lucas <[EMAIL PROTECTED]> wrote:
Daniel Brown wrote:
> On 6/18/07, Jim Lucas <[EMAIL PROTECTED]> wrote:
>> First off, don't jack someone else's thread.
>
>Am I not getting all of the list messages today? I didn't see
> where the thread hijacking occurred
>
--
Jim Lucas
Daniel Brown wrote:
On 6/18/07, Jim Lucas <[EMAIL PROTECTED]> wrote:
First off, don't jack someone else's thread.
Am I not getting all of the list messages today? I didn't see
where the thread hijacking occurred
--
Jim Lucas
"Some men are born to greatness, some achieve greatne
Jim Lucas wrote:
First off, don't jack someone else's thread.
Secondly, I think it might have something to do with the space in the
file name.
Try changing all spaces to %20 and see what happens.
$string = str_replace(' ', '%20', $string);
should do the trick
--
Jim Lucas
"Some men ar
On 6/18/07, Jim Lucas <[EMAIL PROTECTED]> wrote:
First off, don't jack someone else's thread.
Am I not getting all of the list messages today? I didn't see
where the thread hijacking occurred
--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107
--
PHP General
Myron Turner wrote:
I've written a plugin for DokuWiki which uses the following DokuWiki
function for reading files:
function io_readFile($file,$clean=true){
$ret = '';
if(@file_exists($file)){
if(substr($file,-3) == '.gz'){
$ret = join('',gzfile($file));
}el
Edward Vermillion wrote:
On Jun 18, 2007, at 3:30 PM, Myron Turner wrote:
I've written a plugin for DokuWiki which uses the following DokuWiki
function for reading files:
function io_readFile($file,$clean=true){
$ret = '';
if(@file_exists($file)){
if(substr($file,-3) == '.gz'){
$ret = join('
On Jun 18, 2007, at 3:30 PM, Myron Turner wrote:
I've written a plugin for DokuWiki which uses the following
DokuWiki function for reading files:
function io_readFile($file,$clean=true){
$ret = '';
if(@file_exists($file)){
if(substr($file,-3) == '.gz'){
$ret = jo
I've written a plugin for DokuWiki which uses the following DokuWiki
function for reading files:
function io_readFile($file,$clean=true){
$ret = '';
if(@file_exists($file)){
if(substr($file,-3) == '.gz'){
$ret = join('',gzfile($file));
}else if(substr($file,-4
On 17/06/06, Richard Lynch <[EMAIL PROTECTED]> wrote:
I dunno if AJAX will let you quit partway through, but you could
definitely do this with the lean and mean hand-coded XmlHttpRequest
object and sending HEAD to see if the URL is "there" or not.
For security reasons, an XMLHttpRequest objects
I dunno if AJAX will let you quit partway through, but you could
definitely do this with the lean and mean hand-coded XmlHttpRequest
object and sending HEAD to see if the URL is "there" or not.
It will fail, of course, if they run this app from home or anything
not behind the firewall.
On Fri, Ju
At 7:57 AM +0100 6/16/06, George Pitcher wrote:
>Hi,
>
>I have several websites that are using a common set of pages (to reduce
>maintenance, development and upgrading) and use configuration files to give
>the customer the feeling that it is their own unique site. The customers are
>all universitie
Hi,
I have several websites that are using a common set of pages (to reduce
maintenance, development and upgrading) and use configuration files to give
the customer the feeling that it is their own unique site. The customers are
all universities and use the sites to manage digitisation and copyrig
Hi
file_exists('字.gif') always returns false.
Can anyone help me find out a way to make it work also for these kind of
filenames?
I like this one, the readdir() function. It look very promising.
Thanks!
Scott F.
"Matt M." <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > I would like to use the file_exists() or something similar to check for
the
> > existance of any of the xml files regardless of what file
> I would like to use the file_exists() or something similar to check for the
> existance of any of the xml files regardless of what filename it use. Like
> file_exist("*.xml") for example. Anyone know??
http://us3.php.net/readdir
--
PHP General Mailing List (http://www.php.net/)
To uns
> I would like to use the file_exists() or something similar to check for the
> existance of any of the xml files regardless of what filename it use. Like
> file_exist("*.xml") for example. Anyone know??
You may use glob(),
http://www.php.net/glob
Regards,
Philip
--
PHP General Maili
Scott Fletcher wrote:
I would like to use the file_exists() or something similar to check for the
existance of any of the xml files regardless of what filename it use. Like
file_exist("*.xml") for example. Anyone know??
Try glob()
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/regist
[snip]
I would like to use the file_exists() or something similar to check for
the
existance of any of the xml files regardless of what filename it use.
Like
file_exist("*.xml") for example. Anyone know??
[/snip]
Nope, no wildcard. You can only check for a specific file.
--
PHP General Maili
I would like to use the file_exists() or something similar to check for the
existance of any of the xml files regardless of what filename it use. Like
file_exist("*.xml") for example. Anyone know??
FletchSOD
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://w
Marek Kilimajer wrote:
> Steve Magruder - WebCommons.org wrote:
>> File_exists results (and the results from other file-related
>> functions) are cached (according to the php doc) during the run of a
>> script. For instance, if file_exists returns True for a file once,
>> it won't actually test th
Steve Magruder - WebCommons.org wrote:
File_exists results (and the results from other file-related functions) are
cached (according to the php doc) during the run of a script. For instance,
if file_exists returns True for a file once, it won't actually test the file
again if file_exists is run ag
File_exists results (and the results from other file-related functions) are
cached (according to the php doc) during the run of a script. For instance,
if file_exists returns True for a file once, it won't actually test the file
again if file_exists is run again against the file.
What I need to k
I'm again trying to understand differences in Apache and Windows installs of
PHP when I try to upload a file to the server. It seems on Windows, I can't
get the file I'm uploading.
To try to understand this I created a very simple html form that uploads a
text file to the server's TEMP directory u
Tristan --
...and then [EMAIL PROTECTED] said...
%
% RTFM?
% (Sorry, very newbie question)
Sort of, yes :-)
See The Jargon File at
http://catb.org/esr/jargon/
or jump straight to How To Ask Questions The Smart Way
http://www.catb.org/~esr/faqs/smart-questions.html
for not only a definit
RTFM?
(Sorry, very newbie question)
Jason Wong <[EMAIL PROTECTED]>
30/09/2003 12:26
Please respond to
[EMAIL PROTECTED]
To
[EMAIL PROTECTED]
cc
Subject
Re: [PHP] file_exists on different server...
On Tuesday 30 September 2003 19:00, [EMAIL PROTECTED] wrote:
> I'm refere
On Tuesday 30 September 2003 19:00, [EMAIL PROTECTED] wrote:
> I'm referencing an image on a different server, and it keeps changing
> URL's
> Very odd, but t get round that, I tried...
>
> if (file_exists("http://www.othersite.com/image_1.gif";)) {
> $image_show="http://www.othersite.com/i
I'm referencing an image on a different server, and it keeps changing
URL's
Very odd, but t get round that, I tried...
if (file_exists("http://www.othersite.com/image_1.gif";)) {
$image_show="http://www.othersite.com/image_1.gif";;
} else {
$image_show="http://www.mysite.com/image
on 09/03/03 8:10 AM, Charles Kline ([EMAIL PROTECTED]) wrote:
> if(file_exists('cherpdocs/$annrow[id].doc')){
> echo "Funding
> details paper";
> }
This is a pretty simple debugging type query, so:
First things first, make sure that $annrow[id] is what you expect, by
echoing it to the screen.
"
At 22:40 08.03.2003, Khalid El-Kary said:
[snip]
>because you can't directly use the $annrow[id] within single quotes, you
>should use double quotes to do so.
>
>file_exists("cherpdocs/$annrow[id].doc")
>
>or
>
>file_exists('cherpdocs/'.$annrow[id].'.doc')
>
You will probably need to use
file_exists("cherpdocs/{$annrow['id']}.doc") you could also use
file_exists('cherpdocs/' . $annrow['id'] . '.doc')
You should use single quotes to identify your element in an array,
otherwise PHP will try to use it as a constant first.
Jason
On Sat, 2003-03-08 at 14
because you can't directly use the $annrow[id] within single quotes, you
should use double quotes to do so.
file_exists("cherpdocs/$annrow[id].doc")
or
file_exists('cherpdocs/'.$annrow[id].'.doc')
or
file_exists("cherpdocs/".$annrow[id].".doc")
Note: i heared it's prefered to always use the
: <[EMAIL PROTECTED]>
Sent: Saturday, March 08, 2003 1:10 PM
Subject: [PHP] file_exists() question
> Can anyone tell me why this code does not return true when the file in
> the directory cherpdocs/ with the file (which I see as being there)
> does exist?
>
> if(file_exists('ch
Can anyone tell me why this code does not return true when the file in
the directory cherpdocs/ with the file (which I see as being there)
does exist?
if(file_exists('cherpdocs/$annrow[id].doc')){
echo "Funding
details paper";
}
This is a path relative to the file calling it, should i
Hi,
I'm kinda new to PHP and have the following problem: In a function, I want
to verify whether a
file exists before I go on, and if it doesn´t, return false and stop right
there. So I tried
if(!file_exists($my_file)) {
return false;
exit;
}
But since $my_file is a URL, it doesn´t work. Does a
You're right - the example is wrong.
Neil
Anthony Ritter wrote:
> **
> This Message Was Virus Checked With : SAVI 3.58 May 2002
> Last Updated 14th June 2002
> ***
I have a question about the PHP function file_exists():
This is taken from a textbook entitled "PHP Professional Projects" by
Wilfred, Gupta, Bhatnagar (Premier Press 2002 - ISBN1-931841-53-5) on page
261 under the chapter titled "Handling Files".
The authors write...
"Consider the following c
On 6 May 2002 at 20:30, Craig Westerman wrote:
> File is on another server. Is there a way to check if file exists on
> another server?
I wrote the following function a while ago to do this. It works with http URLs and
should also
work with https and ftp, but I have only tested http. I hope it'
onday, May 06, 2002 9:40 PM
> > To: Craig Westerman
> > Cc: php-general-list
> > Subject: Re: [PHP] file_exists
> >
> >
> > Craig Westerman wrote:
> > > I found my problem.
> > Try fopen() if it fails it will return false,
> > otherwise it
On Mon, 6 May 2002, Craig Westerman wrote:
> What am I doing wrong? I get parse error between first echo statement and
> else.
>
> $fn = "image.gif";
> if (!file_exists($fn)) {
> echo "";
> else
> echo "";
> }
> ?>
You open the brace for the positive branch of the if and then leave it
open sur
?
> >
> > Craig ><>
> > [EMAIL PROTECTED]
> >
> >
> > -----Original Message-
> > From: Craig Westerman [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, May 06, 2002 7:58 PM
> > To: php-general-list
> > Subject: [PHP] file_exists
&
om: Craig Westerman [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 06, 2002 7:58 PM
> To: php-general-list
> Subject: [PHP] file_exists
>
>
> What am I doing wrong? I get parse error between first echo statement and
> else.
>
> Thanks
>
> Craig &
ED]
-Original Message-
From: Craig Westerman [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 7:58 PM
To: php-general-list
Subject: [PHP] file_exists
What am I doing wrong? I get parse error between first echo statement and
else.
Thanks
Craig ><>
[EMAIL PROTECTED]
&q
What am I doing wrong? I get parse error between first echo statement and
else.
Thanks
Craig ><>
[EMAIL PROTECTED]
";
else
echo "";
}
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello Prolog,
If course it doesn't use relative positioning.
You should do it like that file_exists("images/...") instead of
("/images/..."). That's all :)
P> I've since tried that also. It too seems to return the same error. I'm
P> curious if the file_exists can't use relative positions
I've since tried that also. It too seems to return the same error. I'm
curious if the file_exists can't use relative positionslike it has to be
in the same folder or you have to use the whole line like c:\ I'm
working on a box that isn't mine of the net...if that's the case I don't
know
Hello Prolog,
Hm... And what about:
print '';
instead of readfile?
P> if(file_exists(/images/$filename))
P> {
P> readfile(/images/$filename);
P> }
P> else
P> {
P> readfile(images/npat.jpg);
P> }
Ivan 'Faeton aka xetrix' Danishevsky
I had a script that was running beautiful that simply called up a database
and displayed the results in tables. I went to add images to this script
and all hell broke loose. This is the portion of the script that I added:
--
//filename is the item number + t.jpg -- t shorthand for thu
As documented: http://php.net/clearstatcache
-Rasmus
On Mon, 6 Aug 2001, Ken Williams wrote:
> Am I an idiot?
> (View this message as text)
>
>
>
> $bIsFileOne = is_file("/tmp/test.txt"); # Will be true cause test.txt will
> exist
>
> sleep (5); # Sleep while you telnet in and remove test.tx
Am I an idiot?
(View this message as text)
File1:
File2:
File3:
File 2 and 3 should show false or 0 cause the file is gone, but they say 1
just like bIsFileOne!
Linux 2.2.18
PHP 4.0.6
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addit
On Tue, Apr 24, 2001 at 12:20:01AM -0300, Paulo - Bruc Internet wrote:
> Can anyone help me?
>
> The sintax of function file_exists is:
>
> if(file_exists("t.txt"))
> {
> print...
> }
>
> Does anybody knows how can work with remote files?
> This is not working:
> if(file_exists("http://www.
Can anyone help me?
The sintax of function file_exists is:
if(file_exists("t.txt"))
{
print...
}
Does anybody knows how can work with remote files?
This is not working:
if(file_exists("http://www.ttt.com/t.txt";))
{
print...
}
Thanks for any help,
Paulo Roberto Ens - Brazil
Bruc S
1 - 100 of 106 matches
Mail list logo