Most voted "include" questions
85 questions
Sort by count of
-
41
votes3
answers57228
viewsWhat 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 require or include or require_once or include_once? I also noticed that you can make these shapes and it works:…
-
15
votes4
answers6237
viewsHow does the "#include" directive work?
C++ "include" does what exactly? I know it "matters" a header/library. But if I have a Header. h com: #include <string> using namespace std; string a() { return "PTSO"; } and on Main.cpp:…
-
12
votes3
answers2583
viewsinclude, require inside functions methods
Use include (or require) within a function or method may cause some conflict or problem with older versions of PHP (such as 5.3)? I noticed that most frameworks working with MVC use require within a…
-
11
votes4
answers913
viewsIs multiple includes bad for performance?
If I use many includes on my page will make it slower or something?
-
9
votes1
answer1239
viewsWhat’s the difference between #include <filename> and #include "filename"?
Why do we use #include <filename> and #include "filename" When to use each?
-
9
votes1
answer298
viewsReserved word include or "use" in PHP?
I saw somewhere that word reserved include in PHP should be used only in procedural programming, and that in object-oriented programming the word reserved should be chosen use. I haven’t found…
-
6
votes1
answer148
viewsProblem with include causing unwanted space
I’m creating a page with some includes (top and footer) and where I put these includes a huge space appears with a strange code () (the code does not appear on the page, only on the…
-
4
votes3
answers2052
viewsHow to avoid repeating html code?
Good night, you guys. The thing is, I’m using the bootstrap and I would like to know how I avoid repeating the same codes on all pages, because the header and footer are the same, it would make the…
-
4
votes1
answer73
viewsWhy is it that when I include my . h header, the . c implementation is not included as well?
I have three files, produtos.h, produtos.c and main.c. produtos.h is located in the folder "headers", produtos.c is located in "sources" and main.c is in the same folder as "headers" and "sources",…
-
3
votes2
answers149
viewsInclude Entityframework
I am working with Entity Framework 6, I have made all the necessary settings. I have a Class Person that owns a Property of the Address Type, within address I have a property Municipality that…
-
3
votes1
answer586
viewsHow do I find out which file includes the other in PHP?
I would like to know in PHP how do I find out which is the parent file, in an inclusion, through the child file. Example: avo.php pai.php php son. In the archive avo.php I have: include_once…
-
3
votes1
answer200
viewsPhpstorm displays a message when using "include" and "require"
What reason my IDE Phpstorm, this message appears with include and require: Dynamic include Expression 'require_once $file' is not analysed. Include Expression is not resolved.…
-
3
votes1
answer960
viewsHow to separate global functions/variables from the program into files?
I have some files: vetores.c // função main uniao.c // função para unir vetores ordena.c // função para ordenar vetores globais.c // arquivo com variáveis globais I want to know how I reference one…
-
3
votes3
answers793
viewsCheck in Javascript if String has string x numbers
Hello, I wonder if there is any way to check if a String has Javascript, for example, 5 number in a random sequence to trigger an event. Therefore: abc123de45 Must be false abc13525de Must be true…
-
3
votes2
answers906
viewsWhat’s the best way to call files?
Well, I use codeigniter (but not specifically in it, anyone who is MVC). I wanted to know the best way to call my files, css, js, fonts, etc. I think the best way is to call in the controller…
-
3
votes2
answers283
viewsRequire and include
Hello I’m having a doubt on the following: Class: "Teste1.php" <?php class Teste1{}... ?> Ex1-include 'Teste1.php' Ex2- include_once 'teste1.php' Ex3- require_once 'Teste1.php' Is it possible…
-
3
votes1
answer201
viewsInclude takes wrong url path
I have the following structure: I would like the file, inside views/usuarios/usuarios-view.php, include the file _layout.html who stands in the way: views/_template/_layout.html, I’m doing so in the…
-
3
votes1
answer96
viewsif only executes Else
Hello guys I have this function ifit collects a variable coming from login.php and does a check to choose between two menus. It just doesn’t matter the result inside the variable $permt he always…
-
3
votes1
answer77
viewsIs there inclusion mapping for ' #include "cmylib" '?
Reading that question, there is talk of the inclusion of headers in c++. In the answer accepted, section #include <filename>, the author speaks the following: it is common to have these names…
-
3
votes1
answer198
viewsMethod "include?" returning false when there is a character in the Ruby string
I’m a beginner in Ruby and I’m trying to create a Hangman game to test my language skills. In a part of the code, I need to get a letter chosen by the user and check if that letter is present in the…
-
2
votes2
answers672
viewsPHP include problem with characters
I’m using include in two files. One file usually includes, however, the other comes with problems in the characters appears in the accents the character "". But opening the two files on notepad++,…
-
2
votes1
answer391
viewsProblem with include.php positioning
I’m having a problem with the positioning of the footer I made with include.php. I created a file include.php, for now the only thing that has in it is a box where the footer will be, because I’m…
-
2
votes1
answer460
viewsRequire Once / Include no Laravel
I’m trying to include a file on a page on a site made in Laravel. The file and page are on different servers. How can I do that? I tried with include and gave the following error : include():…
-
2
votes1
answer61
views.htaccess import another rule file
Guys, I have the following problem, I have an administrative area where can be registered page redirects, and these redirects are saved in the bank, currently I redirect via PHP, but I would like to…
-
2
votes1
answer112
viewsPHP-CPP Include file inside extension
I am developing a php extension with PHP-CPP, where I need to make a include of a php file within the extension, I am doing this to protect the code. I’m trying this way: Php::Value HomeController…
-
2
votes1
answer361
viewsImport multiple libs into a single include in c
Is there any way to import all libs from my program into one include as in other languages : import re, datetime, math ( Python ) ? After reading about pre-processing directives here ( Little is…
-
2
votes1
answer39
viewsDoubt regarding the inclusion of headers
It is considered a "bad programming practice" to include a header that had already been included in another header that included? Was it difficult to understand the doubt above? If so, please note…
-
2
votes1
answer180
viewsOn the inclusion of headers (.h) and due compilation
Assuming I create a file .h for the specification of a function func. h #ifndef FUNC_H #define FUNC_H int xPy(int x, int y); #endif //FUNC_H and then created the implementation of this function in a…
-
2
votes2
answers253
viewsError Include PHP Codeigniter
I’m having a question, how do I correctly include in php codeigniter follows below the script...when I remove the scripts in php works correctly. <?php include('includes/header.inc.php'); ?>…
-
1
votes2
answers1162
viewsInclude creates space in Site Layout
I have two pages. One index.php and the other is called menu.php. As the menu is the same and I repeat it on several pages I preferred to do it in a separate document and then add it with the…
-
1
votes1
answer153
viewsInclude files with friendly URL
I’m using URL friendly on my website, I include the files on index.php everything correctly, and it works in my filing cabinet pages/register.php straight. Only when I access directly with the url…
-
1
votes2
answers1940
viewsPass value via $_GET in include_once
I need to pass a value to a page that’s on one include_once, but I don’t know how to solve: The code I’m using for includes is in the main directory: <?php if (isset($_GET["p"])){ if…
-
1
votes2
answers9312
views -
1
votes1
answer189
viewsHow to reset CSS of various HTML files included by require
At the suggestion of this answer, I’m trying to use the normalize.css to reset the styles between one require and another, but it’s hopeless, the CSS of the later file completely interferes with the…
-
1
votes1
answer1465
viewsWhy does this error appear when I include a php file
I have the error problem  every time I try to include a file. I am working on an application. When trying to include another php file simply create a space on the page where the characters…
-
1
votes1
answer184
viewsBuild error with struct
While trying to compile I am facing the following error: ..: error: storage size of 'PPFila' isn't known ..: error: storage size of 'AUTFila' isn't known On this code line struct Fila PPFila,…
-
1
votes2
answers841
viewsMenu in PHP and HTML
I need you to ask me a question, I created a page and put the menu in PHP. Follow data: php menu. <div class="col-md-9 text-left float-left collapse-navation"> <div class="navbar-collapse…
-
1
votes2
answers4056
viewsFile exists but does not include (require_once)
I have a lodging (of dubious quality), I am making a require_once where I check if the file exists, and is giving error: Warning: require_once(/home//base/Core Application.class.php): failed to open…
-
1
votes1
answer330
viewsInclude in absolute address
I am trying to include the config.php file that is in the site root folder. However, I also have the header.php file at the root of the site and all the pages are in a folder with this name, so the…
-
1
votes0
answers106
viewsinclude no Raintpl
I use Raintpl and I’m trying to make a include on a page by calling a page from the previous folder, but I’m not able to make it work, in the same folder it works like this {include="cities-search"}…
-
1
votes1
answer14
viewsremove include scores to point local folder
Well there is a way to remove double punctuation to point the file to a folder ? I’ve seen this in some projects, plus my include error if not using Example of how it is #include "../utils/bps.hpp"…
-
1
votes1
answer248
viewsWhy do I get this error on locale. h? [Error] expected declaration specifiers or '...' before Numeric Constant
The error ( [Error] expected declaration specifiers or '...' before Numeric Constant ) is pointed out in the setlocale(LC_ALL, "English"); However, the locale. h library and comma are present and…
-
1
votes3
answers524
viewsinclude library in C is required?
I came across the following situation: Ubuntu 16.01 gcc --version gcc (GCC) 6.3.0 Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions.…
-
1
votes2
answers241
viewsA file with multiple functions OR multiple files with a function?
In the scope of my design use include("funcoes.php"), inside that file has all the functions I use in different parts of the project, I don’t use all the functions all the time. So a doubt! Pro…
-
1
votes1
answer361
viewsHow to give include a php file without conflicting with the css of the two files?
I want to put on my page a button that has bootstrap and its own css, this button is in the login.php file. But when I go to give the login.php include in my index.php file it generates a "conflict"…
-
1
votes2
answers1099
viewsInclude or Require in Nodejs to separate codes
Hello! I wonder if in nodejs it is possible to separate some codes in different files as this example below, and how to do this: Currently I have only one file this way: File 111.js var app =…
-
1
votes1
answer1855
viewsinclude failed to open stream
Ladies and gentlemen, please help me. I have a.php client file, which has a client table to fill. The data that will fill this table is in the Client.php class. I am therefore using a include…
-
1
votes2
answers70
viewsUndefined Reference to `Teste_1::Teste_1
They usually say that . cpp is not included in the main but . h, but in my case whenever I include . h is an error and I don’t know why. follows the code: main.cpp #include <iostream> #include…
-
1
votes1
answer349
viewsPHP require_once without the need to pass the full path
I am with a legacy project, where all PHP files connect to the database through the file "oracle_ado.php" This file is in the folder ".. /inc/" and the rest in the folder ".. /Prod/". I am mounting…
-
1
votes1
answer123
viewsChanging the xml by java
I was wondering if there’s a way I could change the layout="@layout/app_bar_main" of <include> by java <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.DrawerLayout…