2010-03-11 5 views
-1

ici est mon dossierproblème de chemin Smarty

index.php 
smartyhere 
    -Smarty.class.php 
admin 
    -index.php 
    -users.php 

dans index.php -> affichage $ smarty-> ('index.tpl');

dans admin/index.php -> $ smarty-> display ('adminindex.tpl'); eu erreur Smarty erreur: impossible de lire la ressource: "adminindex.tpl"

une idée? thx

+0

Pouvez-vous s'il vous plaît inclure les dossiers et les fichiers Smarty aussi? – Cetra

Répondre

-2

essayer de comprendre le code

qui est en train de faire urlencode chemin

<?php 

print_r($file); 

if (isset($file)) { 
    $var = explode("-", $file); 
    print_r($var); 
    $prefix = $var[0]; 
    $script = $var[1]; 
} else { 
    $file = "c-home1"; 
    $prefix = "c"; 
    $script = "home"; 
    $modid = 0; 
} 

if ($script=="") { 
    $script="prod_list"; 
} 

/* 
* following code finds out the modules from suffix 
* and find out the script name 
*/ 
switch ($prefix) { 
    case "c": 
     $module = "content"; 
     break; 
    case "m": 
     $module = "myaccount"; 
     break; 
    default: 
     $module = "content"; 
     break; 
} 

$smarty->assign("module",$module); 

/* 
* following code finds out the modules from suffix and 
* find out the script name 
*/ 
$include_script .= $module."/".$script.".php"; 

if (file_exists($include_script)) { 
    include_once $include_script; 
} else { 
    include_once "content/error.php"; 
} 

if ($script!='home') { 
    if ($script == 'termsandcondition') { 
     $smarty->display("content/termsandcondition.tpl"); 
    } else { 
     $smarty->display("template.tpl"); 
    } 
} else { 
    $smarty->display("template_home.tpl"); 
    $smarty->assign("msg", $msg); 
    $smarty->assign("msglogin", $msglogin); 
} 
+0

Qu'entendez-vous par "quel urlencode est en train de faire"? – noisebleed