Trying to get a website to use another websites database

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
amir
Forum Contributor
Posts: 287
Joined: Sat Oct 07, 2006 4:28 pm

Trying to get a website to use another websites database

Post by amir »

I am moving a website to a new Server, it access/shares a database. If you look at http://www.flairwholesale.com it has missing images and text, please see below for potential problem:

I had this problem when setting up the first one

Code: Select all

if(strstr(realpath($page),"/var/www/html/") == ""){
echo "<script>window.location.href=\"default.php\"</script>";
exit();
}
The account isn't in not in /var/www/html, it should be /home/sites/flairfashion.co.uk/public_html



What do I need to do for the new site, I have the following code:

have a similar problem for the new site, this website uses old site's database for it's images!

In new site's default.php, I have the following code:

Code: Select all

if(strstr(realpath($page),"/var/www/html/") == ""){
//if(strstr(realpath($page),"e:\\inetpub\\wwwroot\\flairfashions\\wholesale\\") == ""){
echo "<script>window.location.href=\"default.php\"</script>";
exit();
what code do I need to change to have the right path? TIA!
Post Reply