Home > Archive > PHP Language > November 2005 > apache language and php include
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
apache language and php include
|
|
| malamessomal@gmail.com 2005-11-16, 6:56 pm |
| Hi all, I have a particular problem with php
i use the apache language module, so i can use file like
index.php.en
index.php.it
index.php.de
...
and if i open index.php they work greatly . But if i include one of
this file in a php script with
<?php include('index.php'); ?>
they don't work, and i see a default language index.php file (the .en
in my case)
Can anyone help me ?
Thanks, marco
| |
| Colin McKinnon 2005-11-17, 6:56 pm |
| malamessomal@gmail.com wrote:
> i use the apache language module, so i can use file like
>
> index.php.en
> index.php.it
> index.php.de
> ..
>
In which case apache picks the right file depending on the info sent by the
browser.
> <?php include('index.php'); ?>
The file is being accessed by the PHP codebase. If you want it to select the
right language file then you need to reference the file explicity.
See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
for details of the information is sent to the server and how to interpret
it, and
http://uk2.php.net/reserved.variables
for how to access this information from PHP.
Note that include/require will accept a variable as an argument.
HTH
C.
| |
| Berimor 2005-11-17, 6:56 pm |
| On 16 Nov 2005 12:18:11 -0800, <malamessomal@gmail.com> wrote:
> Hi all, I have a particular problem with php
>
> i use the apache language module, so i can use file like
>
> index.php.en
> index.php.it
> index.php.de
> ..
>
> and if i open index.php they work greatly . But if i include one of
> this file in a php script with
>
> <?php include('index.php'); ?>
>
> they don't work, and i see a default language index.php file (the .en
> in my case)
>
> Can anyone help me ?
>
> Thanks, marco
>
"include" isn't served by apache - only by PHP interpreter, moreover,
this function needs absolute server path to the file to include - so
Apache doesn't work here.
--
Exact Meta Search | Major Search Engine
http://exactsearcher.com
| |
| malamessomal@gmail.com 2005-11-20, 6:56 pm |
| mmm thanks Colin and Berimor, i try new implementations :D
|
|
|
|
|