|
by: Andrew Crowe |
last post by:
Hi guys,
I've created this little function to check whether a user has uploaded a
file with the same name as an existing file, and if so rename it to
file-1.jpg, file-2.jpg etc.
clearstatcache();
if(file_exists("$BasePath/$FileName.jpg")){
$extra=1;
while(file_exists("$BasePath/$FileName-$extra.jpg")){
|
by: Google Mike |
last post by:
{NOTE: I have PHP 4.2.2 for RH9 Linux.}
Anyone have a better file_exists() out there? Even if you use shell
out tricks with Linux using the `command` trick, I'd be interested to
see what you came up with.
I have this remotely mounted SMB shares on Linux, stuck in my /mnt
directory, and the docs tell me that file_exists() doesn't work on
that. When I tested this, I found this to be true. Therefore, I need
an alternative.
|
by: Hinrich Specht |
last post by:
Hello,
I have a problem using file_exists. I want to use file_exists to
dertermine if a product-image is available or not to show either the
product-image or a standard-image.
This is the code:
$image = "../../artimages/".$item_code.".jpg";
if (file_exists($image))
|
by: annie |
last post by:
Hi
I've got two linux boxes running redhat9 and either PHP Version 4.2.2
or PHP Version 4.3.7. The file structure is set up the same on both
machines and both files exist. The problem is not file specific and
on both machines seq_tables is a symbolic link to another location.
It makes no difference to either version of php whether I use double
or single quotes when asigning a value to $filename. Nor does it
matter whether I use...
|
by: lkrubner |
last post by:
I've written some template code and one thing I'm trying to protect
against is references to images that don't exist. Because users have
the ability to muck around with the templates after everything's been
set up, there is a chance they'll delete an image or ruin some tag
after the web designer has set up everything perfectly. I want the
software to catch mistakes like that and, at the very least, not show
broken links. On the control...
|
|
by: julian_m |
last post by:
I've a site working as follows
Table "articles"
When somebody want to see the article's details, I generate (thorugh
php) a page where all the detalis are listed, as well as the article's
views (images)
|
by: +86 |
last post by:
i encountered this problem:
"include('inc.php')" will work problely
but "include('./inc.php') doesn't work ..
both file_exists('inc.php') or file_exists('./inc.php') didn't return
the right value.this always show "file doesn't exists'
my environment is win2003+iis+php5
how to fix it ?
|
by: Bob Sanderson |
last post by:
This is my code:
if (file_exists($Fname)) {
echo "<td>$Fname exists</td>";
} else {
echo "<td>$Fname does not exist</td>";
}
$Fname is the full path to the file I'm trying to verify. When I run the
script, I get the following output:
|
by: damezumari |
last post by:
$file = 'C:\Documents and Settings\Michael\Escritorio\Elvis\test.txt';
file_exists($file)
and
file_exists('"'.$file.'"')
both return false although the file does exist on the user's machine.
What am I doing worng?
|
by: rickcasey |
last post by:
I'm using PHP 4.4.4-8 on Debian Linux on a low traffic site, and need
to detect if a file exists, and if so, unlink it.
I am mystified as to why the file_exists() function does not work in
one particular section of code, yet does work in another section. The
unlink() function similarly works in one section, but not the other.
I have read other posts in this group where others have had trouble
with the file_exists() function, but none...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
|
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: 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: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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...
|