Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.