I am working with smarty , All setup is done on my local server.
I have Problem with accessing root directory .Please read two cases.
Case 1: Below setup code is working when I am opening this url
http://localhost/shopping/login.php.
then out put is
Smarty Installation test...
Testing template directory...
/Applications/XAMPP/xamppfiles/htdocs/shopping/templates is OK.
Testing compile directory...
/Applications/XAMPP/xamppfiles/htdocs/shopping/templates_c is OK.
Testing plugins directory...
Testing cache directory...
/Applications/XAMPP/xamppfiles/htdocs/shopping/cache is OK.
Testing configs directory...
/Applications/XAMPP/xamppfiles/htdocs/shopping/configs/ is OK.
Tests complete.
case 2: теперь, когда я открываю "http: //localhost/shopping/ui/purchaseorder.php" Это вывод.
Smarty Installation Test ...
Testing template directory...
FAILED: /Applications/XAMPP/xamppfiles/htdocs/shopping/UI/templates/ does not exist.
Testing compile directory...
FAILED: /Applications/XAMPP/xamppfiles/htdocs/shopping/UI/templates_c/ does not exist.
Testing plugins directory...
Testing cache directory...
FAILED: /Applications/XAMPP/xamppfiles/htdocs/shopping/UI/cache/ does not exist.
Testing configs directory...
FAILED: /Applications/XAMPP/xamppfiles/htdocs/shopping/UI/configs/ is not a directory.
Tests complete.
< /code>
Пожалуйста, смотрите этот код настройки, задача с этим кодом это предполагает, что URL -адрес является корневым каталогом.
здесь постоянно < /p>
// echo ROOT_URL;
define('ROOT_DIR',dirname(__FILE__).'/');
define('TEMPLATES_DIR',ROOT_DIR.'templates/');
define('TEMPLATES_C_DIR',ROOT_DIR.'templates_c/');
define('TEMPLATES_CACHE_DIR',ROOT_DIR.'cache/');
define('TEMPLATES_CONFIGS_DIR',ROOT_DIR.'configs/');
use Smarty\Smarty;
$smarty = new Smarty();
$smarty->setTemplateDir =TEMPLATES_DIR;
$smarty->setCompileDir =TEMPLATES_C_DIR;
$smarty->setTemplateDir =TEMPLATES_CACHE_DIR;
$smarty->setCacheDir =TEMPLATES_CONFIGS_DIR;
$smarty->caching = 0;
$smarty->testInstall();
Подробнее здесь: https://stackoverflow.com/questions/796 ... -in-smarty
Корневой каталог отсутствует в Smarty ⇐ Apache
1748091555
Anonymous
I am working with smarty , All setup is done on my local server.
I have Problem with accessing root directory .Please read two cases.
Case 1: Below setup code is working when I am opening this url
http://localhost/shopping/login.php.
then out put is
Smarty Installation test...
Testing template directory...
/Applications/XAMPP/xamppfiles/htdocs/shopping/templates is OK.
Testing compile directory...
/Applications/XAMPP/xamppfiles/htdocs/shopping/templates_c is OK.
Testing plugins directory...
Testing cache directory...
/Applications/XAMPP/xamppfiles/htdocs/shopping/cache is OK.
Testing configs directory...
/Applications/XAMPP/xamppfiles/htdocs/shopping/configs/ is OK.
Tests complete.
case 2: теперь, когда я открываю "http: //localhost/shopping/ui/purchaseorder.php" Это вывод.
Smarty Installation Test ...
Testing template directory...
FAILED: /Applications/XAMPP/xamppfiles/htdocs/shopping/UI/templates/ does not exist.
Testing compile directory...
FAILED: /Applications/XAMPP/xamppfiles/htdocs/shopping/UI/templates_c/ does not exist.
Testing plugins directory...
Testing cache directory...
FAILED: /Applications/XAMPP/xamppfiles/htdocs/shopping/UI/cache/ does not exist.
Testing configs directory...
FAILED: /Applications/XAMPP/xamppfiles/htdocs/shopping/UI/configs/ is not a directory.
Tests complete.
< /code>
Пожалуйста, смотрите этот код настройки, задача с этим кодом это предполагает, что URL -адрес является корневым каталогом.
здесь постоянно < /p>
// echo ROOT_URL;
define('ROOT_DIR',dirname(__FILE__).'/');
define('TEMPLATES_DIR',ROOT_DIR.'templates/');
define('TEMPLATES_C_DIR',ROOT_DIR.'templates_c/');
define('TEMPLATES_CACHE_DIR',ROOT_DIR.'cache/');
define('TEMPLATES_CONFIGS_DIR',ROOT_DIR.'configs/');
use Smarty\Smarty;
$smarty = new Smarty();
$smarty->setTemplateDir =TEMPLATES_DIR;
$smarty->setCompileDir =TEMPLATES_C_DIR;
$smarty->setTemplateDir =TEMPLATES_CACHE_DIR;
$smarty->setCacheDir =TEMPLATES_CONFIGS_DIR;
$smarty->caching = 0;
$smarty->testInstall();
Подробнее здесь: [url]https://stackoverflow.com/questions/79635422/root-directory-missing-in-smarty[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия