Thread: Zend Framework
View Single Post
Old 03-20-2009, 06:20 PM   #2 (permalink)
allworknoplay
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default

Quote:
Originally Posted by Tanax View Post
Ye, I'm having some troubles with Zend framework.
More specificly the view files.

I have this:
index.phtml
Code:
<h1 align="center">
    Hello, Zend Framework MVC!
</h1>

<?php echo 'Testing'; ?>
It outputs "Hello, Zend Framework MVC", but not the "Testing" part.
I tried other stuff, but it's almost like the PHP won't evaluate or be proccessed by the server.

I'm using WAMP on localhost btw.

When I check the source code on the page, I even see the PHP code there, but with the php tags and the echo part aswell. Like an HTML comment.. or something.

Any clues?


Also, another problem I'm having is when creating the .htaccess file. Whenever I have an access file, it gives me 500 server error, no matter what's in the file. Do I have to enable mod_rewrite or anything? Why is it giving me that error?

Thanks!

Ok, your issue is that your webserver, I assume IIS? Is not interpreting your code as PHP. That's why the PHP tags are being printed out.

Perhaps it doesn't know about .phtml?

Try renaming your file to: index.php

And see what happens...
allworknoplay is offline  
Reply With Quote