PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > alt.php > Unix Paths question
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Unix Paths question

Réponse
 
LinkBack Outils de la discussion
Vieux 02/10/2007, 23h28   #1
Mike
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Unix Paths question

Hello,
I have a file structure that is exactly the same on 2 different
servers:
On one, this works:
<?php require_once('../Connections/xxx.php'); ?>

on another, that doesnt work but this does:
<?php require_once('Connections/xxx.php');?>

any reason??

Thanks
Mike

  Réponse avec citation
Vieux 03/10/2007, 07h52   #2
David Quinton
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Unix Paths question

On Tue, 02 Oct 2007 22:28:59 -0000, Mike <ampeloso@gmail.com> wrote:

>Hello,
>I have a file structure that is exactly the same on 2 different
>servers:
>On one, this works:
><?php require_once('../Connections/xxx.php'); ?>
>
>on another, that doesnt work but this does:
><?php require_once('Connections/xxx.php');?>
>
>any reason??
>



The Include path (in php.ini and/or .htaccess)
?
--
Locate your Mobile phone: <http://www.bizorg.co.uk/news.html>
Great gifts: <http://www.ThisBritain.com/ASOS_popup.html>
  Réponse avec citation
Vieux 03/10/2007, 17h29   #3
J.O. Aho
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Unix Paths question

Mike wrote:
> Hello,
> I have a file structure that is exactly the same on 2 different
> servers:
> On one, this works:
> <?php require_once('../Connections/xxx.php'); ?>
>
> on another, that doesnt work but this does:
> <?php require_once('Connections/xxx.php');?>
>
> any reason??


Are you sure you have the Connections/xxx.php on the same relative paths on
the both servers

Say you are in /home/username/public_html

Then to the first one to work, you will need the file located in

/home/username/Connections/xxx.php

for the second one to work, the file need to be located in

/home/username/public_html/Connections/xxx.php


You can also set a include directory that is always checked when including
files, in that case the file may be located in

/var/php/include/Connections/xxx.php

and can be included with

require_once('Connections/xxx.php');

as Devid pointed out, check the php.ini.

--

//Aho
  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 10h02.


Édité par : vBulletin® version 3.7.3
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 ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11011 seconds with 11 queries