Welcome Guest, Not a member yet? Register   Sign In
include does not work
#1

[eluser]Unknown[/eluser]
Hi, I'm new on this forum, I write because I have a problem with the 'include' in CodeIgniter (sorry for my bad English, I'm italian =) ).

I have a menu white 5-6 items, and depending on what the user selects, I include a different page, but it dosen't't wordk.

Can you help me, please.

Thanks
#2

[eluser]Glazz[/eluser]
Post some code to see exactly what your are doing.
#3

[eluser]Unknown[/eluser]
Code:
$s=$_GET['s'];
            $Us=$_GET['Us'];
            //se non ha indicato nessuna scheda o ha indicato le aziende visualizzo esse
            if ($s == "Supervisore"){
             //codeee


                //se non รจ impostata nessuna tab visualizzo quella di default
                if(empty($Us)){
                    include 'www.wordsbank.altervista.org/include_backend/show.php';
                }
                else if ($Us == "Aziende"){
                    echo "Scheda Supervisore - Aziende";
                }
                else if ($Us == "Contratti"){
                    echo "Scheda Supervisore - Contratti";
                }
                else if ($Us == "Utenti"){
                    echo "Scheda Supervisore - Utenti";
                }
                else if ($Us == "Fatture"){
                    echo "Scheda Supervisore - Fatture";
                }
                else if ($Us == "Opzioni"){
                    echo "Scheda Supervisore - Opzioni";
                }

            }
I know there are private folders, where you can not put new files, but I put this folder in the root.
where there is 'echo' there are include..
#4

[eluser]CodeIgniteMe[/eluser]
I don't think that external includes are allowed in php. What is the full error message returned after you ran this?
#5

[eluser]InsiteFX[/eluser]
PHP Net - include

Example #3 include() through HTTP:
Code:
<?php

/* This example assumes that www.example.com is configured to parse .php
* files and not .txt files. Also, 'Works' here means that the variables
* $foo and $bar are available within the included file. */

// Won't work; file.txt wasn't handled by www.example.com as PHP
include 'http://www.example.com/file.txt?foo=1&bar=2';

// Won't work; looks for a file named 'file.php?foo=1&bar=2' on the
// local filesystem.
include 'file.php?foo=1&bar=2';

// Works.
include 'http://www.example.com/file.php?foo=1&bar=2';

So maybe if you add the http:/ it may work!

InsiteFX
#6

[eluser]antoniofrignani[/eluser]
Hi, i think you have to enable allow_url_include in your php.ini for this to work.
(Devi abilitare la direttiva allow_url_include di PHP nel file PHP.ini, anche se non credo che altervista ti permetta di farlo).

See here: http://php.net/manual/en/filesystem.configuration.php




Theme © iAndrew 2016 - Forum software by © MyBB