Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how does this line function: require_once('Zend/Registry.php');?

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?

like image 730
user2243528 Avatar asked Jul 04 '26 10:07

user2243528


1 Answers

In you php.ini check this

include_path 

it would have the default location of your zend directory.

like image 107
chandresh_cool Avatar answered Jul 06 '26 00:07

chandresh_cool



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!