35 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for jonow

I know i just posted below, but i have another question. Is it dangerous to have the <head> tag be included using PHP include? Is it dangerous to have the <body> tag or <html> tag or doctype to be included using PHP?

Member Avatar for Squiva
1
2K
Member Avatar for sbesch

I am interested in getting some opinions on the use of include files to sub-divide a large module into functionally related groups. What I'm interested in is opening a discussion on best practices and minimal requirements. Here's the scenario: I am working with a library with 200+ functions. They naturally …

Member Avatar for mike_2000_17
0
272
Member Avatar for fheppell

I've got a file that includes various php files with a rewrite framework. I'm importing a class and registering it, and it functions for all code on that page. However when I try to require() a file, it does not seem to have access to the class. require __DIR__.'/lib/UserApp/Autoloader.php'; // …

Member Avatar for fheppell
0
240
Member Avatar for joshl_1995

Hello Community, I'm trying to connect to my database using PDO but for some reason it keep coming back saying "Undefined variable: db_c" db_c is the variable I've chossen for the name of my database connection. I've placed the database connection in another file, and I'm trying to connect to …

Member Avatar for cereal
0
286
Member Avatar for fheppell

I've got a page that requires a file called config.php, this file is included in several other files, all in the same (root) directory. PHP gave me the error `[16-Nov-2013 12:30:17 UTC] PHP Fatal error: require_once(): Failed opening required '/models/config.php' (include_path='.:/Applications/MAMP/bin/php/php5.4.4/lib/php') in /Applications/MAMP/htdocs/things/picturecamel/uploader.php on line 70` however the file is …

0
285
Member Avatar for Olagsfark

Please i got a problem linking my .cpp files together in my c++ project. I dnt knw how to specify the file path for #include . Please any help?

Member Avatar for phorce
0
214
Member Avatar for eng442

It's been a long time since I don't post here, even forgot my username. Sorry if this is the wrong section. I can't get the $_POST['name'] values sent from an html form on my php file. I've seen lots of similar questions but nothing helped. I have lot's of includes …

Member Avatar for eng442
0
518
Member Avatar for Reliable

Hey, I solved one problem and can't get rid of another. I have used spry menus before with no problem. Now that I want to use the efficiency of an include statement for my navigation it won't style correctly. [Here](http://www.mtechenterprises.com/inec/) is the site I'm working on. The problem shows on …

Member Avatar for Reliable
0
231
Member Avatar for rajesh1158

I am trying to connect mysql from within PHP function. The credentials are stored in a separate PHP file, which I am including it inside the function. But when I run the script, I am getting following error: Warning: mysql_query(): A link to the server could not be established in …

Member Avatar for rajesh1158
0
346
Member Avatar for dancks

I'm a noob, I know very little about php. Anyway, my page won't load at all, browser says its redirecting in a way that is not loading. As the title suggests I think the issue is with one of the php files I include with require_once(). Let me just show …

Member Avatar for dancks
0
285
Member Avatar for dcdruck

Hi. I am currently in a position where I am having to learn Perl in the context of developing a website using Embperl. I am at a point where I have a few subroutines that I would like to try off-loading to a separate file and then including that file …

Member Avatar for dcdruck
0
159
Member Avatar for adishardis

Hi everybody, I really should know this but I can't get it to work... :-O I'm just trying to call a page based on the username of the person who is logged in! <?php include ({$session->username}/file.php\); ?> Preparing to feeling stupid... Peace Adam

Member Avatar for adishardis
0
121
Member Avatar for Aiedail

My code does not work in certain versions of IE and I want to include a conditional comment that includes a different navigation file so that links to pure html5 content wont be there. is there a way to remove the include of the menu.php and then i can just …

Member Avatar for Aiedail
0
239
Member Avatar for megachip04

I have an approve.php inside an /include directory. I have another file inside the /pop_up directory. Approve.php [CODE] if (!isset($_SESSION['username'])) { header("location:log_in.php"); die(); } [/CODE] When i run the include('include/approve.php') code in files in the main directory, it works. When I run the include('../include/approve.php') in files in the pop_up/ directory …

Member Avatar for shah01
0
563
Member Avatar for shandoosheri

hi how can i include a range of numbered files like file1.php,file2.php,file4.php i have tried this code but it didn't work [CODE]<?php foreach (range(0, 7) as $fileno) { include "files/file" + $fileno + ".php";}?>[/CODE]

Member Avatar for cwarn23
0
116
Member Avatar for Epicurus

I've created a new class called BulletList2(linked list) using the built in dialog(File>New Class) which created a header file called bulletlist.h (in project folder>include) and a source file called bulletlist2.cpp(in project folder > src). header file [CODE=c++]#ifndef BULLETLIST2_H #define BULLETLIST2_H class BulletList2 { [...] } #endif // BULLETLIST2_H [/CODE] In …

Member Avatar for Epicurus
0
3K
Member Avatar for ben1996123

Hello, I just downloaded the [url=https://mattmccutchen.net/bigint/]big integer library[/url], and I want to use it in my prime number checking program. I downloaded the zip file and got a bunch of .cc and .hh files. I need to know what to do with the files, where I should put them, and …

Member Avatar for ben1996123
0
231
Member Avatar for manchurianCEO

I posted this once but no one is stopping by so maybe the title didn't sound much interesting. I got the code for a google search bar and pasted it on the corresponding <div id and made a separate file for the search results and worked perfectly. But when I …

Member Avatar for almostbob
0
258
Member Avatar for jrotunda85

So I'm trying to create one central file for my navigation which is used across my site; however, some of the pages are in different directories. So, for example , let's say I have the following directories -- domain.com/ domain.com/dir1/ domain.com/dir2/ If I wanted to use the same include between …

Member Avatar for jrotunda85
0
123
Member Avatar for ggeoff

Hi I am using the PHP include statement to enable publication of a piece of news. The news is filed as "news.txt" and the user has access to a directory to upload the file or delete old news but no access to the code. If the file does not exist …

Member Avatar for diafol
0
206
Member Avatar for biogig

so I've been trying to write this program that takes the data from a file and outputs the year the rainfall how much it is below/above the average, the average raifall and the std deviation and for some reason I get three C4552 warnings:'>': operator has no effect on three …

Member Avatar for biogig
0
861
Member Avatar for Brianbc

Working with some OOP, I had an error that I have now traced to inistantiation of a class when the file in which the class is contained is included in any other file. Is this the default/normal behaviour of php, and how do I get myself out of this? I …

Member Avatar for Brianbc
0
107
Member Avatar for jontes

Hello, I'm new here, so I hope I'll ask my question correctly. I have an assignment to create a "text-based cosmic adventure" and all went well until now. My project is separated into several header and implementation files. Problem arises only when I include certain file in another header file. …

Member Avatar for jontes
0
4K
Member Avatar for GreaseJunkie

Hi, I've got this nice little sales tool/form written where I can drop email addresses into my webform and automatically send an HTML email, but I want to have the option to send a different html body using a drop-down option. For example, if I want to send a "general …

Member Avatar for GreaseJunkie
0
228
Member Avatar for iw2z

Hi all, I'm sure this is a trivial question for the veterans (and the newbs maybe as well). But I just can't find a straight answer to it. So here it goes: I have my main.cpp file, and 2 more files, custom.h and custom.cpp. Obviously, custom.h would contain declarations, prototype...etc, …

Member Avatar for Ancient Dragon
0
174
Member Avatar for garea

I have a problem with recursive imports in C++. I have this 2 classes: [CODE] //File A.h #include "B.h" class A{ public: A(){}; void doA(B b){ b.doB(); } } [/CODE] [CODE] //File B.h #include "A.h" class B{ public: B(){}; void doB(A a){ a.doA(); } } [/CODE] I tried to use …

Member Avatar for rodc
0
804
Member Avatar for jmaddy10

Hello all, I just started working at a firm as a web assistant and was given the task of redesigning our site. One of my tasks involves making the site more efficient by using include files. I have never designed with this in mind and despite my best research I …

Member Avatar for jmaddy10
0
284
Member Avatar for daino

Hi Would anyone know if there is a book explaining all the various C++ Libraries and what features they encapsulate? I'm thinking in terms of, for example: iostream -- then a list of features and functions in iostream etc. Could anyone suggest any books or good reference material for this …

Member Avatar for daino
0
214
Member Avatar for haribo83

I have a php page showing records from an sql database, when the user clicks on a link they are taken to a detail page with more info etc. All of this works fine - the issue is that I wiould like uses to be able to submit a form …

Member Avatar for saiprem
0
370
Member Avatar for kartik14

Hi, I'm having problems adding images to a game I'm trying to modify. The given project has some images in a folder called "Images". So I added new images to this folder and tried to use these new ones in my code. To do this, I right clicked on the …

Member Avatar for jamesonh20
0
404

The End.