Folder structure in XAMPP

Soldato
Joined
27 Dec 2005
Posts
17,310
Location
Bristol
How do I make the folder structure in XAMPP perform the same way as my web host? I don't know what the terms are but in XAMPP the URLs are relative to the webpage but normally they're relative to the file.

For example if my 'includes/header.php' has a reference to '/css/style.css' then on my webhost this always works, but in XAMPP it fails for anything but the homepage, with everything else needing a direct reference, ie '../../css/style.css'.

Also can I make it accept just <? rather than <?php?

Thanks!
 
For the <? to work you need to enable short tags in your php.ini file.

I would make sure it's the same as your live environment. I've been caught out before using short tags in the dev environment and then it not working on the live environment because they were not configured the same.
 
Back
Top Bottom