Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $hostName='localhost';
- $userName='xxxxxxxxx';
- $userPass='xxxxxxxxx';
- ?>
- <?php
- include 'db.php';
- echo $hostName;
- ?>
- <?php
- $settings = 'my setting';
- ?>
- include_once "settings.php"
- ...
- class MyClass {
- ....
- include_once "settings.php" //does nothing since file is already included
- //I can't reach $settings from here.
- }
- ...
- include_once "settings.php"
- ...
- class MyClass {
- ....
- include "settings.php" //includes file again
- //I can reach $settings here
- }
- ...
- $settings = 'my setting';
- ...
- class MyClass {
- ....
- //I can't reach $settings from here.
- }
- ...
- $settings = 'my setting';
- ...
- class MyClass {
- ....
- $settings = 'my setting';
- //I can use $settings here obviously
- }
- ...
Add Comment
Please, Sign In to add comment