Reply to Re: use virtual hosts to develop locally but upload throws error in source file references

Your name:

Reply:


Posted by Jerry Stuckle on 01/21/07 02:50

Paul wrote:
> That works but here's the issue. I develop locally using virtual host like
> www.client1site.com. When I want my client to see the progress, I upload
> to:www.mysite.com/clients/client1/
>
> So you can see that by referencing:
> require_once($_SERVER['DOCUMENT_ROOT']."/utility/top.php");
> take the reference to mysite.com/utility/, where instead I want it to go to
> mysite.com/clients/client1/utility
>
> Does that make better sense?
>
> I am just looking for a way where I don't have to change all my references
> when I upload it for client review, BEFORE uploading it to it's final host.
>
>

I don't understand your problem.

Let's say your local machine path the the file is
/var/http/clients/client1/utility/top.php

So, just have a virtual host on your local machine which points to
/var/http/clients/client1. Another virtual host will point at a
different directory.

I have about a dozen different virtual hosts on my development machine
right now, each pointing to a different directory. And the files on
every one have the same path relative to their document root that the
specific client has.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация