|
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 |
Grimtaz Smarty n00b
Joined: 01 Jul 2008 Posts: 3
|
Posted: Wed Jul 02, 2008 12:10 am Post subject: Newb Question about Smarty and virtual directories |
|
|
Hello.
I have a PHP script written by someone else that uses Smarty templates and a mySql database. Basically it's a script that generates an image on the fly to be used in a signature by just using a link to that image which is dynamically created.
An exmaple link in a forum signature would be:
domain/ticker/tickers/abcde.png
The thing is this physical file location doesn't actually exist on my server only mydomain/ticker
I would of expected a page not found error but it comes up with the image. At the time of seeing the image on the page I open up my FTP client and access the directories on my server but this location does not exist.
Can anyone explain how this works or how the server knows where to go to get this image when the physical url does not exist!? |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Wed Jul 02, 2008 7:26 am Post subject: |
|
|
Why not ask the "someone else" who has written It?
If you are using apache look for mod_alias and mod_rewrite. |
|
Back to top |
|
Grimtaz Smarty n00b
Joined: 01 Jul 2008 Posts: 3
|
Posted: Wed Jul 02, 2008 8:26 am Post subject: |
|
|
They will not tell me as it was a purchased script.
I found a main.php file within the root which contains the following:
Code: | $img = @imagecreatefrompng( "{$main_path}tickers/{$bgcode}{$slcode}{$code}.png" ); |
What I don't understand is how you can create an image on the fly without requesting say a html or php page itself. Is the smarty engine responsibile for this you think??
Your help would be appreciated. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Wed Jul 02, 2008 12:11 pm Post subject: |
|
|
The logic how this is done must be in your pruchased script. SMARTY does not handle these sorts of things. |
|
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
|