You are here: httpd.conf and XAMPP « PHP Programming Language « IT news, forums, messages
httpd.conf and XAMPP

Posted by John K on 01/09/06 16:24

I am still pretty new to this environment and don't know much about
httpd.conf. I understand that it is the place to configure the server
but don't know how to actually use it for what I'm trying to do.

I use XAMPP to develop locally. There is an external test server here
but it can be a pain to mess with it as I can only use it via SSH
(something else I'm new to) and prefer to develop locally until I have
enough to bother with moving everything up.

In XAMPP, when I use an include, such as <?php include "menu.php";?>, I
have to change that include (which is in the root) to <?php include
"../menu/php";?> This is not a big deal BUT the menu in that include
references images, which are also in the root.

The problem: if the menu include file is called from another directory
underneath the root directory the images are broken because that
reference images in the root, not in the same directory. In ASP I
would just reference the images like this: <img src="/image.jpg">.
This way no matter where I was, in the root or 10 subdirectories deep,
"/image.jpg" would always be looked for in the root. The way it is
working out with XAMPP is it looks for the image in the "htdocs"
directory, not the root of the site I am working on. The only way I
can figure a way around this is to create 2 include files and I'm
trying to avoid that.

When I use the test server (external to this machine) I can apparently
use absolute directory references just fine but I want XAMPP to behave
the same way.

I'm only assuming but is httpd.conf the answer? And if so how do I do
it?

Thanks!!!

 

Navigation:

[Reply to this 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

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