smarty template read problem ?
| From: | Győrvári Gábor | Date: | Tue, 31 Aug 2004 08:57:56 +0000 |
| Subject: | smarty template read problem ? | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-11744@lists.php.net to get a copy of this message | ||
Hi,
Yesterday i switched on a server from 2.6.1 to 2.6.3 and i noticed a problem.
fetch from test/test.txt
fetch return:
Warning: Smarty error: unable to read resource: "test/test.txt" in /raid/development/scr34m/smarty_test/libs-263/Smarty.class.php on line 1083
This is a bug or not ? i need to put ../test/test.txt ? every where not enough to use test/test.txt ?
Or maybee this was a bug in prevously versions ?
Sample scripts below
-----------------------------------------------------------------
Smarty 2.6.3
fetch from templates/test.txt
fetch return: inside templates dir
fetch from ../test.txt
fetch return: outside
fetch from test/test.txt
fetch return:
Warning: Smarty error: unable to read resource: "test/test.txt" in /raid/development/scr34m/smarty_test/libs-263/Smarty.class.php on line 1083
<?php
require_once 'libs-263/Smarty.class.php';
$tpl = new Smarty;
echo 'Smarty 2.6.3<br>';
echo 'fetch from templates/test.txt<br>';
echo 'fetch return: '.$tpl->fetch('test.txt').'<br><br>';
echo 'fetch from ../test.txt<br>';
echo 'fetch return: '.$tpl->fetch('../test.txt').'<br><br>';
echo 'fetch from test/test.txt<br>';
echo 'fetch return: '.$tpl->fetch('test/test.txt').'<br><br>';
?>
-----------------------------------------------------------------
Smarty 2.6.2
fetch from templates/test.txt
fetch return: inside templates dir
fetch from ../test.txt
fetch return: outside
fetch from test/test.txt
fetch return: test directory test.txt file
<?php
require_once 'libs-262/Smarty.class.php';
$tpl = new Smarty;
echo 'Smarty 2.6.2<br>';
echo 'fetch from templates/test.txt<br>';
echo 'fetch return: '.$tpl->fetch('test.txt').'<br><br>';
echo 'fetch from ../test.txt<br>';
echo 'fetch return: '.$tpl->fetch('../test.txt').'<br><br>';
echo 'fetch from test/test.txt<br>';
echo 'fetch return: '.$tpl->fetch('test/test.txt').'<br><br>';
?>
-----------------------------------------------------------------
Smarty 2.6.1
fetch from templates/test.txt
fetch return: inside templates dir
fetch from ../test.txt
fetch return: outside
fetch from test/test.txt
fetch return: test directory test.txt file
<?php
require_once 'libs-261/Smarty.class.php';
$tpl = new Smarty;
echo 'Smarty 2.6.1<br>';
echo 'fetch from templates/test.txt<br>';
echo 'fetch return: '.$tpl->fetch('test.txt').'<br><br>';
echo 'fetch from ../test.txt<br>';
echo 'fetch return: '.$tpl->fetch('../test.txt').'<br><br>';
echo 'fetch from test/test.txt<br>';
echo 'fetch return: '.$tpl->fetch('test/test.txt').'<br><br>';
?>
--
Scr34m kign!
http://frontember.hu - mailto:scr34m@frontember.hu - icq:12502783