Results 1 to 25 of 89
Mar 5, 2010, 06:25 #1
- Join Date
- Jan 2010
- 0 Post(s)
- 0 Thread(s)
Direct Path Names for Hosting Using PHP
I'm having a fairly simple problem which I think can be solved, but I'd like to know if there is a more efficient solution.
When building a website on my personal computer, I use WAMP and the direct path name involves something with "localhost".
However, when I upload those same files to my virtual host, the direct path names that I had set for images, links, etc. no longer work because the direct path name is not the same. In short, the direct path name depends on the host, in which they are different between my personal computer and the virtual host.
My solution is to assign the full direct path name to a PHP string, and then set that PHP string to everything that needs a direct path name. I will also have to change the direct path name every time between testing on my personal computer and uploading the files to the Internet.
While it's certainly doable, is there a more efficient solution to this problem? I'd be greatly appreciative. Thanks!