| Author |
PHP basics
|
bala kan
Ranch Hand
Joined: Aug 20, 2012
Posts: 44
|
|
Hi Friends,
I would like to use the tpl file, php file and html file just to display the welcome message..
tpl file is
php file
Html file
but it gives an error:
Warning: Smarty error: unable to read resource: "welcome.html" in C:\wamp\www\tpl\lib\Smarty.class.php on line 1094
please rectify me...
Thanks in advance..
Regards,
Bala
|
 |
Matthew Brown
Bartender
Joined: Apr 06, 2010
Posts: 3865
|
|
Well, the obvious answer is that it can't find the file. Either it's looking in the wrong place, or the web server doesn't have permissions to read it.
By the way, this isn't about your specific question, but the way you're using your files looks very strange. Why do you have all the HTML document stuff (<head> and <body> tags etc) in all three files? It should only be in the template. The PHP file shouldn't have any static content - it's just passing things on to the template engine. And the welcome.html file is being included in the middle of a page. If it was working, you'd be getting output something like this:
See what I mean?
|
 |
 |
|
|
subject: PHP basics
|
|
|