Questions tagged as 'require'

2
answers

How to eliminate the space that require_once leaves?

When I use require_once to do the top-of-site inclusion, it leaves an upper space at about 8px, even in CSS I using body {         padding: 0;         margin: 0;         border: 0;     }; the problem remains. Here is my complete CSS code:...
asked by 19.05.2016 / 15:15
4
answers

Access config.php variables

I am a beginner in php and I have a problem, I have a config.php file like this: <?php $config['dbHostname'] = 'localhost'; $config['dbUser'] = 'teste'; $config['dbPassword'] = 'passteste'; But I have a class with connection and database...
asked by 08.04.2014 / 05:35
1
answer

Using require, where to use this tag?

Tinah asked this question before, but I was not so specific so I decided to reformulate here by putting my code to understand better. Here I have the main file that will be used as a template for all pages: <!DOCTYPE html> <html lang...
asked by 10.08.2017 / 21:57
1
answer

PHP require_once without the need to pass the full path

I have a legacy project, where all PHP files connect to the database through the file "oracle_ado.php" This file is in the "../inc/" folder and the rest in the folder "../ prod /". I'm setting up another server for this application, where t...
asked by 24.10.2017 / 12:24
0
answers

Use of undefined constant

Well I was having the same problem from this question, gave an answer to using define('ROOT_PATH', dirname(__FILE__)); , ( my problem without using this solution) but in mine it does not work. It throws the error:    Warning: Use of...
asked by 23.07.2018 / 00:33
1
answer

Doubt about require_once for various classes

Is there any way to require multiple classes using just one require_once? I do not think I was doing a function and another question came up, does func_get_args return an array?     
asked by 04.05.2018 / 21:09
0
answers

Using jQuery correctly + RequireJS + AngularJS

I am trying to get the themes/cms/build/js/main.min.js file to work properly after being loaded by RequireJS , but I have not been successful. The file is loaded, some functions work as console.log() , but others like $(elemen...
asked by 02.10.2016 / 00:36
3
answers

What to use require / include / require_once / include_once?

I am developing an application in PHP and would like to know when and why to use% or require or include or require_once ? I also noticed what you can do in these ways and it works: require_once myfile.php; require_o...
asked by 09.05.2014 / 10:18
2
answers

require_once does not work

I'm trying to give require_once in a PHP file that has a class. The file I'm trying to include in PHP with the class has only one array with configuration data, but I can not get it properly. class CoreDatabase { public $database;...
asked by 14.11.2017 / 18:29
1
answer

Why does the require_once function work on localhost but does not work on the server?

Dear, I have a framework that accesses data from other servers, I programmed every system in localhost, on my machine. However, when playing to the server, the external call of pages does not work, for example: require_once("http://meusite.com...
asked by 12.04.2016 / 15:00