|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
smoretti Smarty n00b
Joined: 16 Oct 2015 Posts: 2
|
Posted: Fri Oct 23, 2015 9:54 am Post subject: nocache for a file out of smarty/apache scope? |
|
|
Hi
I want to include a basic text file in a page but don't want it to be cached.
The file is out of Smarty and Apache scope.
I tried
Code: | {include file='/var/tmp/list_main_db.txt' nocache} |
or
Code: | {nocache}
{include file='/var/tmp/list_main_db.txt' nocache}
{/nocache} |
without any success, the file is never up-to-date.
I use Smarty 3.1.1 on Linux.
Any idea how to solve this? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat Oct 24, 2015 10:05 pm Post subject: |
|
|
It should work. Does Apache the right permissions to access the file?
If it's plain text you could read the file in PHP and assign its content to a nocache variable. |
|
Back to top |
|
smoretti Smarty n00b
Joined: 16 Oct 2015 Posts: 2
|
Posted: Mon Oct 26, 2015 8:11 am Post subject: |
|
|
Code: | It should work. Does Apache the right permissions to access the file? |
Yes, the file is readable by all.
And if I remove manually cached files, it is read.
Code: | If it's plain text you could read the file in PHP and assign its content to a nocache variable. |
I am far from a PHP master. How do you do that? |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|