I have installed Zend Framework 2(Zend Framework + Zend Server) on my win 7.
In Zend/Apache2/htdocs/hello1.php, I put below script:
<?php
require_once('Zend/Registry.php');
$registry = Zend_Registry::getInstance();
$registry['name'] = 'Quentin Zervaas';
echo sprintf('My name is %s', $registry['name']);
?>
Then I run http://localhost/hello1.php, it shows:
My name is Quentin Zervaas
My question is:
for this line require_once('Zend/Registry.php'); under htdocs folder, it is dummy.php, favicon.ico, index.html,hello1.php,
there is no Zend folder, so how does this line function?
In you php.ini check this
include_path
it would have the default location of your zend directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With