Travailler sur les retours localhost mais le serveur « failed to open stream: Aucun fichier ou répertoire »
-
25-09-2019 - |
Question
Sur ma machine locale fonctionne le script bien, mais quand je l'ai mis sur le serveur je reçois:
application / crochets / zend.php
[9]: require_once (Chargeur / Autoloader.php) [Function.require-fois]: failed to open stream: Aucun fichier ou répertoire
Stack Trace
application / crochets / zend.php [9]: require_once ()
système / core / Kohana.php [199]: comprendre( application / crochets / zend.php)
système / core / Bootstrap.php [37]: la configuration de kohana ()
index.php [106]: exiger (système / core / Bootstrap.php)
Je suis en train de charger dans ZEND Kohana 2.3. Voici zend.php
<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
* zend.php
*/
ini_set('include_path', ini_get('include_path').
PATH_SEPARATOR.SYSPATH.'vendor/');
ini_set('include_path', ini_get('include_path').
PATH_SEPARATOR.SYSPATH.'vendor/Zend/');
require_once 'Loader/Autoloader.php';
Zend_Loader_Autoloader::getInstance();
?>
J'ai déconcerté sur ce pendant environ 2 jours et j'ai suivi beaucoup de nombreux tutoriels différents et différents itinéraires de le faire. Ainsi, toute direction serait génial. À l'heure actuelle ma structure de fichier et mis en place correspond à ce
La solution
cela fonctionne à chaque fois pour moi:
<?php require_once($_SERVER['DOCUMENT_ROOT'] . '/Loader/Autoloader.php'); ?>
Autres conseils
Comment cela?
if ($path = Kohana::find_file('vendors', 'Zend/library/Zend/Loader'))
{
ini_set('include_path', ini_get('include_path').PATH_SEPARATOR.dirname(dirname($path)));
require_once 'Zend/Loader/Autoloader.php';
Zend_Loader_Autoloader::getInstance();
}
Source: kohana-zend (Kolanos)