On Fri, Dec 2, 2011 at 1:30 PM, Dee Ayy dee@gmail.com wrote:
The following code:
$new_file =
ADS_DIR_INTERNAL.'/'.$ad_info['id'].'_'.$ad_info['filename'];
echo NEW_FILE:[.$new_file.]\n;
echo file_exists Using
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,
Maciek Sokolewicz 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, afile2.txt, afile3.txt,
And also, bfile1.txt,
Daniel Kolbo wrote:
Maciek Sokolewicz 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, afile2.txt, afile3.txt,
On 9 Dec 2008, at 23:24, Daniel Kolbo wrote:
Maciek Sokolewicz 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,
On Wed, Dec 10, 2008 at 1:13 PM, Stut [EMAIL PROTECTED] wrote:
On 9 Dec 2008, at 23:24, Daniel Kolbo wrote:
Maciek Sokolewicz 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
Stan a écrit :
The script is running on an UBUNTU v8.04 LAMP server. Case is supposed to
matter, isn't it?
With a POSIX filesystem only. If you store you're pictures in a fat
or ntfs filesystem, case sensitive will not matter. BTW, extension
concept doesn't exists in POSIX filesystems,
Stut,
Shouting is something that happens when people are actually speaking and
listening. In a medium where there is no other way to emphasize salient
points in a message, capitalization is all that works. I'm sorry it
offended your sensabilities.
realpath() fails, just like file_exists()
On 24 Nov 2008, at 14:41, Stan wrote:
Shouting is something that happens when people are actually speaking
and
listening. In a medium where there is no other way to emphasize
salient
points in a message, capitalization is all that works. I'm sorry it
offended your sensabilities.
It's
On Mon, Nov 24, 2008 at 10:02 AM, Stut [EMAIL PROTECTED] wrote:
On 24 Nov 2008, at 14:41, Stan wrote:
Shouting is something that happens when people are actually speaking and
listening. In a medium where there is no other way to emphasize salient
points in a message, capitalization is all
Let me attack this in a different way. This started because my camera names
files whatever.JPG and my thumbnail generator generates thumbnail files
whatever.jpg. Given my workstation (upon which I edit code and run a web
browser) is W2K and my web server is APACHE2 on UBUNTU, I sometimes have to
On 23 Nov 2008, at 18:53, Stan wrote:
Let me attack this in a different way. This started because my
camera names
files whatever.JPG and my thumbnail generator generates thumbnail
files
whatever.jpg. Given my workstation (upon which I edit code and run
a web
browser) is W2K and my web
Stan wrote:
How can I do that, please? Do what? Detect, programmatically, FOR SURE and
FOR CERTAIN, that a specific file exists.
http://uk2.php.net/touch
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
This thread began because file_exists() WILL NOT tell that a file exists FOR
SURE and FOR CERTAIN if the file you check for happens to be named
whatever.jpg and whatever.JPG exists. I know this because IMagick then
chokes on whatever.jpg because it DOESN't exist.
--
PHP General Mailing List
I do NOT want to create an empty file!
Nathan Rixham [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Stan wrote:
How can I do that, please? Do what? Detect, programmatically, FOR SURE
and
FOR CERTAIN, that a specific file exists.
http://uk2.php.net/touch
--
PHP General
On Sun, 2008-11-23 at 13:12 -0600, Stan wrote:
This thread began because file_exists() WILL NOT tell that a file exists FOR
SURE and FOR CERTAIN if the file you check for happens to be named
whatever.jpg and whatever.JPG exists. I know this because IMagick then
chokes on whatever.jpg because
Stan wrote:
This thread began because file_exists() WILL NOT tell that a file exists FOR
SURE and FOR CERTAIN if the file you check for happens to be named
whatever.jpg and whatever.JPG exists. I know this because IMagick then
chokes on whatever.jpg because it DOESN't exist.
a: you really
On 23 Nov 2008, at 19:12, Stan wrote:
This thread began because file_exists() WILL NOT tell that a file
exists FOR
SURE and FOR CERTAIN if the file you check for happens to be named
whatever.jpg and whatever.JPG exists. I know this because IMagick
then
chokes on whatever.jpg because it
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
I think file_exists returns false for remote files ;)
On Nov 15, 2007, at 2:33 AM, Colin Guthrie [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
Subject: Re: [PHP] file_exists
Casey wrote:
I think file_exists returns false for remote files ;)
Even if it did (it doesn't:
http://uk3.php.net/manual/en/wrappers.ftp.php), I'd still rather not let
someone steal my /etc/passwd or /etc/shadow etc. files.
As I said before. Some form of regexp or similar restriction is
I think file_exists returns false for remote files ;)
Even if it did (it doesn't:
http://uk3.php.net/manual/en/wrappers.ftp.php), I'd still rather not let
someone steal my /etc/passwd or /etc/shadow etc. files.
As I said before. Some form of regexp or similar restriction is 100%
It could present a problem depending on how the permissions are setup
on the shared hosting and if open_base is in effect.
If they can get the /etc/shadow file from a php being ran by apache
then you have an issue, because apache would be
running as root. Take the below example.
Jonny Bergström schrieb:
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?
Unicode filenames can't be properly handled up to now for all I know.
Perhaps waiting for PHP6 might be your only solution.
OLLi
--
On Sat, 2005-10-22 at 19:19, Oliver Grätz wrote:
Jonny Bergström schrieb:
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?
Unicode filenames can't be properly handled up to now for all I know.
Robert Cummings schrieb:
You could try execing a shell command to give you the answer. I don't
know if it'll work, but worth a shot if you're in a bind.
Yep, good idea. Use the native code of the OS ofr listing the file (dir,
ls...) and parse the result.
OLLi
Manche sagen,
Good idea yes. But apparantly Windows couldn't do it either. :-(
function file_exists_windows($path) {
exec('dir ' . $path, $output, $return_status);
return $return_status == 0 ? true : false; // Windows dir will return 0 when
something was found
}
It works with normal ascii file names, but
On Sat, October 22, 2005 7:12 pm, Jonny Bergström wrote:
Good idea yes. But apparantly Windows couldn't do it either. :-(
function file_exists_windows($path) {
exec('dir ' . $path, $output, $return_status);
return $return_status == 0 ? true : false; // Windows dir will return
0 when
On 10/23/05, Oliver Grätz [EMAIL PROTECTED] wrote:
I believe that the problem is not Windows being unable to look fpr unicode
files but PHP being unable to put th unicode string correctly in the command
line you are trying to execute. Check this by doing exec('echo
test.txt'.$path); and
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??
FletchSOD
fnmatch()
--
PHP General Mailing List (http://www.php.net/)
To
If you're using NTFS file system... please make sure that the PHP's temporay
UPLOAD directory and SESSIONDATA directory are set with the correct
permissions.
I mean that the user IUSR_YOURCOMPUTER has write permissions in these
directories.
Hope it will help
- David Strencsev
--
PHP General
Thanks, that worked
David Strencsev [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
If you're using NTFS file system... please make sure that the PHP's
temporay
UPLOAD directory and SESSIONDATA directory are set with the correct
permissions.
I mean that the user IUSR_YOURCOMPUTER
It may be an OS feature file_exists relies on...
But you can use is_uploaded_file() function to check whether the file exists
or not.
Manu.
Chris Williams [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I'm again trying to understand differences in Apache and Windows installs
of
PHP
Thanks, but it make the test to move on to other things like,
size($filename) which tells me the file does not exist.
Chris
Manuel VáZquez Acosta [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
It may be an OS feature file_exists relies on...
But you can use is_uploaded_file()
On Thursday 20 November 2003 13:05, Chris Williams wrote:
Thanks, but it make the test to move on to other things like,
size($filename) which tells me the file does not exist.
print_r($_FILES)
--
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
*
Have a look at the fopen() function in the FileSystem Function section of
the Docs. fopen() can open a file over http:// and I imagine it returns
FALSE if it cant open it. If it doesn't return false, you could analyse the
headers in $http_response_header.
Hope this helps.
Cheers,
Owen Prime
Craig Westerman wrote:
What am I doing wrong? I get parse error between first echo statement and
else.
Thanks
Craig
[EMAIL PROTECTED]
?php
$fn = image.gif;
if (!file_exists($fn)) {
echo img src=noimageexists.gif;
else
echo img src=$fn;
}
?
You've got your semicolons in
file_exists takes a string argument.
/images/$filename is not a string.
try images/ . $filename instead.
Fred
Prolog [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I had a script that was running beautiful that simply called up a database
and displayed the
38 matches
Mail list logo