require-once Questions

3

Solved

I have a class in a file "evalmath.php". If I require it like this: require_once('evalmath.php'); the entire contents of that file is echoed out to the screen. If I do it like this, require...
Bilharziasis asked 26/9, 2012 at 2:36

3

Solved

I have a file located in my CakePHP root folder placed under a folder named cron. Path is: c:/wamp/www/project/cron/daily.php This file requires another file placed inside vendor folder of cake ...
Nystagmus asked 7/9, 2012 at 10:54

7

Solved

I'm using a simple pre-made authorisation tool to secure my site. The tool requires this line of code to be applied to the top of every .php page. Auth.php lives on the root level. <?php ${(req...
Missend asked 15/3, 2012 at 19:23

4

Solved

It seems that if require_once is called within function, the included file doesn't extend the global variable scope. How to require_once a file to global scope from within a function? What I'm try...
Rockrose asked 25/1, 2012 at 11:48

1

Solved

I'm using the following to define root while in development: define('LOCAL_URL', 'http://localhost/~xampp/Mysite'); define('REMOTE_URL', 'http://example.com'); define('DEV_VERSION', true); if(DEV_...
Claritaclarity asked 3/11, 2011 at 3:54

3

Solved

I have the following in a PHP document I'm calling from a cron job. if (is_file($docRoot . $row['cron_action_script_path'])) { system("php " . $docRoot . $row['cron_action_script_path'] . $row['...
Caralie asked 19/9, 2011 at 18:10

1

I'm a beginner in PHP. And i'm working on project with this directories hierarchy : model, control, view and helper folders are in my project folder Now i'm trying to write a file init.php and req...
Uric asked 30/7, 2011 at 17:33

4

Solved

Today I've tried to include file that returns object. I always use require_once, however now I've noticed weird behavior of it. File main.php $lang = false; $lang->name = "eng"; $lang->auth...
Cyanide asked 4/6, 2010 at 14:4

3

Solved

I have a php file which has a require_once Statement (?) this file is then in included in 2 other php files, one php file is in a sub directory so the layout is like this ("file1" and "file2" inclu...
Ferland asked 16/4, 2010 at 11:18

4

Solved

I have several static factory patterns in my PHP library. However, memory footprint is getting out of hand and we want to reduce the number of files required during execution time. Here is an examp...
Tuttifrutti asked 5/11, 2008 at 21:37

© 2022 - 2024 — McMap. All rights reserved.