srisar
srisar

Reputation: 1571

How can i use Zend framework in my php project?

I want to know how can i use Zend Framework in my php project where my web host doesnt support it. Im using only bunch of the Zend classes, so can I put them inside my include folder and upload it to my site? Will this work?

Upvotes: 2

Views: 431

Answers (2)

Ankit Vishwakarma
Ankit Vishwakarma

Reputation: 1691

First include autoloader class.

require_once 'lib/Zend/Loader/StandardAutoloader.php';
$loader = new Zend\Loader\StandardAutoloader(array('autoregister_zf' => true));

$loader->registerNamespace('Http\PhpEnvironment', 'lib/Zend/Http');

//Register with spl_autoload:
$loader->register();

and then use below line

$a = new Zend\Http\PhpEnvironment\Request();
echo $a->getQuery()->get();

this is just the demo that you can use loosly coupled zend library to your project.

Upvotes: 1

Alex
Alex

Reputation: 6470

Here is great place to get started http://framework.zend.com/manual/en/

If you host supports PHP 5, then Zend Framework will work without any problems.

Usually Zend directory is placed inside of lib directory, look at Quick Start.

Upvotes: 0

Related Questions