Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Initial API 2.5 sample code display problems HELP

 
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
eatc7402
Smarty Rookie


Joined: 18 Feb 2008
Posts: 23

PostPosted: Tue Feb 19, 2008 6:17 am    Post subject: Initial API 2.5 sample code display problems HELP Reply with quote

I am a first time user of the API 2.5. I am having
some problems I don't understand. at first I thought
they were maybe PEAR installation issues. So I reinstalled PEAR. ALL seemed to go well, and a
phpinfo() confirms install and correct include paths.
But when I attempt to run the sample (with my own
GoogleAPIKey and database user/pass etc. all I get is a raw outut of the source code like this...
Code:

setDSN('mysql://DavidF:kengsiew@localhost/eatc7402'); // enter YOUR Google Map Key $map->setAPIKey('ABQIAAAAA4K1gFTiRd0xfFgeHzQw0hTP81zwqMVqjTUM_vZYQ577HzJg0RRNJeOGWk2rt0_xqmUSXhvqHdYfhw'); // create some map markers $map->addMarkerByAddress('621 N 48th St # 6 Lincoln NE 68502','PJ Pizza','PJ Pizza'); $map->addMarkerByAddress('826 P St Lincoln NE 68502','Old Chicago','Old Chicago'); $map->addMarkerByAddress('3457 Holdrege St Lincoln NE 68502',"Valentino's","Valentino's"); ?>  printHeaderJS(); ?>  printMapJS(); ?>
printMap(); ?>    printSidebar(); ?>


I don't understand this. is it me, or my config, or something else.Hmmm. I could use a steer please.

eatc7402
Back to top
View user's profile Send private message Send e-mail
eatc7402
Smarty Rookie


Joined: 18 Feb 2008
Posts: 23

PostPosted: Tue Feb 19, 2008 7:09 am    Post subject: Problem solved! Reply with quote

Problem fixed. I had saved the sample code into
a file, and saved the file as an .htm extension '
file. WRONG! THIS WILL NOT WORK.

I resaved the SAME EXACT FILE with a .php file
extension and it now works fine. My own error.
A simple one, so simple it was throwing me for a loop
in kind of a 'forest for the trees' kind of error.

eatc7402
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons 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