Problems with the Windows version of XAMPP, questions, comments, and anything related.
I'm pretty sure this is a common question:
I've been using XAMPP for about a month now, switching over from AppServ. (Loving it BTW).
However i cant seem to get my paths to link to my root directory when i use a forward slash before the path name "/file.php" (example) on my localhost. It works fine when i upload to my online server but i dont wanna have to keep uploading to debug.
- Posts: 2
- Joined: 19. June 2011 10:00
- Posts: 9067
- Joined: 09. March 2008 13:04
do you mean sth like this?
- Code: Select all
// script heading
If (($_SERVER["DOCUMENT_ROOT"] == "C:/xampp/htdocs") ? $rootpath = "C:/xampp/htdocs" : $rootpath = "/HOST_ROOT");
$inc_path = $rootpath."/inc";
require_once ($inc_path."/common_settings.php" ); //setting main parameter used in scripts, depending on xampp or hosted
// other script
hint: internal links are differnt too
- Posts: 661
- Joined: 08. January 2010 10:54
- Operating System: Win7Home Prem 64 SP1
Return to XAMPP for Windows
Who is online
Users browsing this forum: No registered users and 26 guests