Jump to content

[SOLVED] Zend Framework and file location


coder_

Recommended Posts

People, I have a problem with a zend framework and file location.

 

application/
    controllers/
    views/
        _header/
        _footer/
        scripts/
             index/
        style/
             style.css
library/
    Zend/
index.php

 

I am running this on XAMPP 1.6.6a.

Everithing is good when i do not specifiy controller and action in url.

so http://"vhost_name.localhost"/ works well, but when i specify controller and action(or just a controller)

http://"vhost_name.localhost"/login/ or

http://"vhost_name.localhost"/login/index/

 

html code is loaded and displayed on page, but css style and images are not.

So this is my index.phtml file (its just a begining of project)

<?php
require_once 'application/views/scripts/_header/header.html';
?>
<div id="main_window">
	<img src="application/views/scripts/style/images/bug_helpdesk.png" />
</div>
<?php
require_once 'application/views/scripts/_footer/footer.html';
?>

So, header and footer are displayed but image is not.

Enyone knows how to solve this problem??

 

Link to comment
https://forums.phpfreaks.com/topic/117711-solved-zend-framework-and-file-location/
Share on other sites

Try a layout like this:

 

/application

/controllers

/views

/scripts

/index

/index.phtml

/library

/Zend

/public_html <-- document root

/styles

/style.css

/index.php

/.htaccess

(etc.)

 

It's better because you aren't storing things inside document root that doesn't belong there (see: http://www.phpfreaks.com/tutorial/php-security/page5)

 

Also, how have you setup the rewrites?

 

Come on, people! It's urgent!

Not for us.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.