coder_ Posted August 1, 2008 Share Posted August 1, 2008 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?? Quote Link to comment https://forums.phpfreaks.com/topic/117711-solved-zend-framework-and-file-location/ Share on other sites More sharing options...
coder_ Posted August 1, 2008 Author Share Posted August 1, 2008 So nobody can help me?? Quote Link to comment https://forums.phpfreaks.com/topic/117711-solved-zend-framework-and-file-location/#findComment-605544 Share on other sites More sharing options...
wildteen88 Posted August 1, 2008 Share Posted August 1, 2008 I have not used Zend Framwork, however shouldn't all images, stylesheets etc be placed within the public folder, not the views folder. Quote Link to comment https://forums.phpfreaks.com/topic/117711-solved-zend-framework-and-file-location/#findComment-605546 Share on other sites More sharing options...
coder_ Posted August 1, 2008 Author Share Posted August 1, 2008 i tried to put them into the public folder, but when I type controller and action into URL them i get the same thing. No css and images. And html is shown correctly. Quote Link to comment https://forums.phpfreaks.com/topic/117711-solved-zend-framework-and-file-location/#findComment-605552 Share on other sites More sharing options...
coder_ Posted August 1, 2008 Author Share Posted August 1, 2008 Come on, people! It's urgent! I have been searching zend framework's docs but didnt found anything. Quote Link to comment https://forums.phpfreaks.com/topic/117711-solved-zend-framework-and-file-location/#findComment-605662 Share on other sites More sharing options...
Daniel0 Posted August 1, 2008 Share Posted August 1, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/117711-solved-zend-framework-and-file-location/#findComment-605712 Share on other sites More sharing options...
coder_ Posted August 2, 2008 Author Share Posted August 2, 2008 Sorry peolpe my mistake. I setup dir structure correctly and check paths to files and it works now. :-\ Quote Link to comment https://forums.phpfreaks.com/topic/117711-solved-zend-framework-and-file-location/#findComment-605812 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.