Re: [SMARTY] hello again :)
| From: | Monte Ohrt | Date: | Thu, 28 Nov 2002 16:22:21 +0000 |
| Subject: | Re: [SMARTY] hello again :) | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6594@lists.php.net to get a copy of this message | ||
Whether or not absolute paths are used, you don't want either to break your plugin. That's the point.
So this:
{img src="my.gif"}
and this:
{img src="/my.gif"}
will both find the gif under the document root.
Monte
Rasmus Schultz wrote:
well, yes - I'm not sure what to do about that? I'm also not sure you should be doing that in the first place? I generally to avoid using absolute paths, unless it's absolutely necessary ... because if you ever decide you want to move your pages to another folder, and they're full of absolute paths, to pictures or whatever else, you're screwed... --- At 2002-11-25, 23:49:00, Monte Ohrt <monte@ispi.net> wrote:If it works, then you must happen to have your script in the top level of your document root. To make it work from anywhere, you should prepend the document root directory to your image path to be sure it works right. What if you used "/gifs/my.gif" instead, I'll bet it fails? Monte Rasmus Schultz wrote:what are you putting in for the image path?exactly like the example shows, or for example: {img src="gifs/my.gif" border=1} if my gifs had been located in such a folder, that is. what can I say, it works? but show me how to do it "correctly" then? :)