Getting is_dir(file on remote server) to be true

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
evand
Forum Newbie
Posts: 1
Joined: Fri Oct 10, 2008 10:14 am

Getting is_dir(file on remote server) to be true

Post by evand »

I'm trying to migrate a website to a new server (we'll call it "serverA"), but some of the files to be referenced must stay on the old server (serverA).

How can I get the "is_dir" function to refer to files on a remote server??

I'm fairly new to php, and have no real Apache knowledge (serverB) aside from today's research on the topic.

My thoughts:
Is there proper syntax that I don't know about? Something comparable to "../" but for changing servers?
Do the Apache configuration settings need to be tweaked? Httpd.conf file mods? .htaccess? I've looked into all 3, but haven't yet been able to affect any changes.


Visit: http://evandana.com/test3.php.

I want to learn how to make php recognize the remote reference as a directory.

The browser renders the following code:

Code: Select all

<?php
 
$files = 'http://www.bludot.com/browse_products/';
qisdir ($files);
 
$files = 'images/';
qisdir ($files);
 
 
                    function qisdir($files) {
                        echo $files."<br />";
                        if( is_dir($files)) {
                        echo "isDir!"."<br /><br />";
                        } else {
                        echo "is NOT dir"."<br /><br />";
                        }
                    }
                    
                    
?>
 
User avatar
ambivalent
Forum Contributor
Posts: 173
Joined: Thu Apr 14, 2005 8:58 pm
Location: Toronto, ON

Re: Getting is_dir(file on remote server) to be true

Post by ambivalent »

As far as I'm aware, is_dir (along with is_file, is_readable, etc) will only work on the local server.
Post Reply