Getting is_dir(file on remote server) to be true
Posted: Fri Oct 10, 2008 10:45 am
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:
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 />";
}
}
?>