PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.info.servers.win > How to have my own php files in another folder than ...\xampp\htdocs\xampp?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.info.servers.win Web servers for MS Windows and NT.

How to have my own php files in another folder than ...\xampp\htdocs\xampp?

Réponse
 
LinkBack Outils de la discussion
Vieux 19/07/2005, 16h01   #1 (permalink)
damezumari
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut How to have my own php files in another folder than ...\xampp\htdocs\xampp?

I use winxp.

I use xampp from apachefriends.org and are extremely pleased with the
programs. The installation went like a dream.

One question:

At the moment, when I use localhost, I put all the php files I write in
the folder ...\apache php mysql etc\xampp\htdocs\xampp, however I would
like to put them in various folders like c:\php files\project1\, c:\php
files\project 2, and even on my usb stick like e:\php files\project1\.

Can this be done? How do I easily change between the folders?

I am grateful for any !

Regards,

Jan Nordgreen

  Réponse avec citation
Vieux 19/07/2005, 22h40   #2 (permalink)
Terry Stockdale
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to have my own php files in another folder than ...\xampp\htdocs\xampp?

On 19 Jul 2005 08:01:27 -0700, "damezumari" <jannordgreen@gmail.com>
wrote:

>I use winxp.
>
>I use xampp from apachefriends.org and are extremely pleased with the
>programs. The installation went like a dream.
>
>One question:
>
>At the moment, when I use localhost, I put all the php files I write in
>the folder ...\apache php mysql etc\xampp\htdocs\xampp, however I would
>like to put them in various folders like c:\php files\project1\, c:\php
>files\project 2, and even on my usb stick like e:\php files\project1\.
>
>Can this be done? How do I easily change between the folders?
>
>I am grateful for any !
>
>Regards,
>
>Jan Nordgreen


Jan,
Can you use virtual hosts with xampp? I'm using the standard Apache
2.0.52 under WinXP on my development machine -- and I just create
different directories for different projects, set them up as virtual
hosts, set them up in c:\windows\system32\drivers\etc\hosts to point
to 127.0.0.1 -- and then restart Apache.

An example listing in the hosts file is:
127.0.0.1 test tnw nw thenextwindow testing apache http manual
each of those is a virtual host, all pointing to 127.0.0.1. The
httpd.conf file's virtual host directives point to each's "root"
directory.

For some examples of my setup, you can see a discussion in my web
design forums at
http://www.terrystockdale.com/forums...opic.php?t=165

Terry
My weekly newsletter: http://www.terryscomputertips.com

  Réponse avec citation
Vieux 20/07/2005, 12h17   #3 (permalink)
damezumari
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to have my own php files in another folder than ...\xampp\htdocs\xampp?

Hi Terry,

Thanks a lot for your advice! I followed it like this.

1. I opened the file C:\WINDOWS\system32\drivers\etc\hosts in a text
editor and changed the only instruction from

127.0.0.1 localhost
to
127.0.0.1 localhost calendar

2. I opened the file ...\xampp\apache\conf\httpd.conf in a text editor
and added these instructions.

NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "E:\programming\php programs\dx"
ServerName calendar
</VirtualHost>

3. I copied all the files in my dx project to the folder
E:\programming\php programs\dx.

4. I restarted apache.

5. I typed this url in my web browser: http://calendar/dx_login.php.
Vuaw! The file was found and did its job as when it was in its original
folder. In short: it worked!

I gave the steps a bit detailed in case others would like to do the
same and need a bit more details. Also, if I did something
inappropriate when it comes to security, or what have you, please tell
me.

Thanks again for your !

Regards,

Jan Nordgreen

  Réponse avec citation
Vieux 20/07/2005, 12h17   #4 (permalink)
damezumari
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to have my own php files in another folder than ...\xampp\htdocs\xampp?

Hi Terry,

Thanks a lot for your advice! I followed it like this.

1. I opened the file C:\WINDOWS\system32\drivers\etc\hosts in a text
editor and changed the only instruction from

127.0.0.1 localhost
to
127.0.0.1 localhost calendar

2. I opened the file ...\xampp\apache\conf\httpd.conf in a text editor
and added these instructions.

NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "E:\programming\php programs\dx"
ServerName calendar
</VirtualHost>

3. I copied all the files in my dx project to the folder
E:\programming\php programs\dx.

4. I restarted apache.

5. I typed this url in my web browser: http://calendar/dx_login.php.
Vuaw! The file was found and did its job as when it was in its original
folder. In short: it worked!

I gave the steps a bit detailed in case others would like to do the
same and need a bit more details. Also, if I did something
inappropriate when it comes to security, or what have you, please tell
me.

Thanks again for your !

Regards,

Jan Nordgreen

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 23h13.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09416 seconds with 12 queries