[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Zend Framework - Index.php

Posted on 2012-04-03
2
Medium Priority
?
571 Views
Last Modified: 2012-08-14
So...I'm doing my first Zend Framework project and the index.PHP code is as such

"<?php

// Define path to application directory
set_include_path(implode(PATH_SEPARATOR, array(
    || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));

// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/../library'),
    get_include_path(),
)));

/** Zend_Application */
require_once 'Zend/Application.php';

// Create application, bootstrap, and run
$application = new Zend_Application(
    APPLICATION_ENV,
    APPLICATION_PATH . '/configs/application.ini'
);
$application->bootstrap()
            ->run();"

When I build the project it comes up on the index.phtml page....

Where in that "index.php" code does it direct to the "/application/views/scripts/index/index.phtml"?

I'm trying to understand how that gets routed and can't figure it out.

Thanks
0
Comment
Question by:ProdigyOne2k
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 14

Accepted Solution

by:
Scott Madeira earned 2000 total points
ID: 37804290
The .phtml is part of the view (the V in MVC) and the index.php is the controller.  The view is invoked through $application - the instance of ZEND_APPLICATION.

Here is a quick-start link to get you started... http://framework.zend.com/manual/en/zend.application.quick-start.html

Note that ZEND Framework is fairly complicated.  I suggest watching some tutorials or reading some books.  It isn't a trivial exercise.
0
 
LVL 14

Expert Comment

by:Scott Madeira
ID: 37804293
Also, I would also suggest that you run your project through your IDE (Netbeans, Eclipse, Zend Studio, etc.) in debugging mode so that you can step through all the classes and see how it all fits together.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question