Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Newb Question about Smarty and virtual directories

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
Grimtaz
Smarty n00b


Joined: 01 Jul 2008
Posts: 3

PostPosted: Wed Jul 02, 2008 12:10 am    Post subject: Newb Question about Smarty and virtual directories Reply with quote

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
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Wed Jul 02, 2008 7:26 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Grimtaz
Smarty n00b


Joined: 01 Jul 2008
Posts: 3

PostPosted: Wed Jul 02, 2008 8:26 am    Post subject: Reply with quote

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
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Wed Jul 02, 2008 12:11 pm    Post subject: Reply with quote

The logic how this is done must be in your pruchased script. SMARTY does not handle these sorts of things.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP