Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
file_exists() - Help Needed
Old 12-31-2009, 06:04 AM file_exists() - Help Needed
evans123's Avatar
Ultra Talker

Posts: 468
Trades: 0
Im using the above function file_exists() for a file on my server with the location http://www.championshipfl.com/xxxxx however this doesnt seem to work as i put in fake locations that are non-existant and it still says they exist.

PHP Code:
                              <?php
                              $count 
0;
                              
$sql mysql_query("SELECT * FROM `****`");
                              while(
$row mysql_fetch_array($sql))
                              {
                              
//Check To See If Location Exists
                              
$filename "http://www.championshipfl.com/" $row['location'];
                                if (
file_exists($filename) == FALSE) {
                                
$count++;
                              
$linked mysql_fetch_array(mysql_query("SELECT * FROM `****` WHERE `id` = '" $row['linked_to'] . "'"));
                              echo 
"<tr><td>" $row['id'] . "</td><td>" $row['name'] . " (" $linked['name'] . ")</td><td>http://www.championshipfl.com/" $row['location'] . "</td></tr>";
                                }
                              }
                              echo 
$count;
                              if(
$count == 0)
                              {
                              echo 
"<tr><td colspan='3'>All Pages Have Existing Locations</td></tr>";
                              } 
?>
evans123 is offline
Reply With Quote
View Public Profile Visit evans123's homepage!
 
 
Register now for full access!
Old 12-31-2009, 06:06 AM Re: file_exists() - Help Needed
evans123's Avatar
Ultra Talker

Posts: 468
Trades: 0
No worries resolved issue, you have to use the "/home/**/***/****/" method of location!
evans123 is offline
Reply With Quote
View Public Profile Visit evans123's homepage!
 
Old 12-31-2009, 06:09 AM Re: file_exists() - Help Needed
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
file_exists takes a relative path NOT an absolute URI.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to file_exists() - Help Needed
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.14179 seconds with 12 queries