Hi, I am trying to learn OOP with c++ with the help of Turbo C++ version 3.0 and "C++ Primer Plus" by stephen prata. according to the book, the NEW convention for including the iostream header file in c++ is in the following way: #include<iostream> but it causes an error saying : unable to open include file "IOSTREAM" however the following code works: #include<iostream.h> but it is supposed to be the OLD convention Moreover , according to the book, it is necessary to use the following: using namespace std so that we can use cout and cin directly without having …

Member Avatar
Member Avatar
+0 forum 6

So I'm having a huge brain fart here and I know for a fact I am going about this the wrong way. Unfortunately, I can't refer to previous work I've done where I have done this correctly as I no longer have access to them. I have my index page grabbing information from different PHP pages then displaying them on screen. The reason why it's grabbing them from different PHP pages is because some times, these scripts will fail. If this was all in the same page, it would cause the whole page to fail so I want to call …

Member Avatar
Member Avatar
+0 forum 3

Two files to edit/maintain a data array. data.php looks something like this: <?php $data_array[0]['key1'] = 'value'; $data_array[0]['key2'] = 'value'; $data_array[1]['key1'] = 'value'; $data_array[1]['key2'] = 'value'; $data_array[2]['key1'] = 'value'; $data_array[2]['key2'] = 'value'; ?> admin.php works something like this: function get_data() { include 'data.php'; // do a load of stuff with $data_array to create an HTML form // so that the user can edit it. return $html_form; } function add_record() { include 'data.php'; // read the POST data and format it into a string // read $data_array into a string and append that string the POST data string // write string back …

Member Avatar
Member Avatar
+0 forum 6

hello my friends i have posted this article before but it stil didn't work so so i tried many time different way but i dont see the reason why my menu is not working. in my main page `template.php` here is the content <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <meta charset="utf-8"/> <link href='http://fonts.googleapis.com/css?family=Roboto:500,400' rel='stylesheet' type='text/css'> <script src="js/jquery-1.11.3.min.js"></script> <link href="header/header.css" rel="stylesheet" type="text/css"> <link href="header/menuresponsive.css" rel="stylesheet" type="text/css"> <link href="style/bodystyle.css" rel="stylesheet" type="text/css"> <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"/> <script type="text/javascriipt" src="header/fonctionmenu.js"></script> </head> <body> <div class="site-container"> <div class="site-pusher"> <?php include('../header/header.php'); ?> // i also tried include("../header/header.php") <div class="site-content"> <div class="container"> <!-- site content --> …

Member Avatar
Member Avatar
+0 forum 11

hello danifriends. i'm developing my website with php and i want to make dynamic header, so i create i file header.php with logo and menu and the page had all html doctype and and head tag for link with css and js..., i include the header in my page using `include(../header/header.php)`, and so i was thinking that i was going to have html doctype 2 time in every pages where i include header and the `<head>` so i delete the doctype in header.php and `<head>` after that i dont have any php error for include but the space of header …

Member Avatar
Member Avatar
+0 forum 12

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
Member Avatar
+1 forum 8

Hey everyone i have a little problem with the navigation bar, i have created the design of the menu but i want to be in one file (menu.html) and to show on all pages in the website... here is my code for `menu.html` <html> <body> <meta http-equiv="content-type" content="text/html;charset=utf-8"/> <style> form.position-and-style { opacity:1; position:absolute; border-radius:20px; width:150px; left:-1%; top:10%; height:100px; background-color:white; border:1px solid gray; } #pocetna { opacity:1; position:absolute; top:10%; left:20%; font-feature-settings:normal; font-style:normal; font-family:sans-serif; font-size:15px; } #kontakt { opacity:1; position:absolute; top:70%; left:20%; font-feature-settings:normal; font-style:normal; font-family:sans-serif; font-size:15px; } </style> <form class='position-and-style'> <a id='pocetna' href='index.html'><b>Почетна</b></a> <a id='kontakt' href='sleden_cekor.html'><b>Контакт</b></a> </form> </body> </html> Tell me how …

Member Avatar
Member Avatar
+0 forum 10

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 divide into 2 sets: and advanced set of calls and a "simplified set" which fills in some of the more arcane, rarely used arguments with typical defaults and then calls the advanced functions. So, instead of having one file with 2000+ lines of code, you have a master file with …

Member Avatar
Member Avatar
+0 forum 14

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'; // Include UserApp Library require __DIR__.'/lib/UserAppWidget/Autoloader.php'; // Include UserApp Widget, friendly-ifying API UserApp\Autoloader::register(); UserApp\Widget\Autoloader::register(); use \UserApp\Widget\User; User::setAppId("XXXXXX"); ... // Post for login $router->post('/login', function() { if(!User::authenticated()){ require('db_handlers/login.php'); }else{ header("Location: dashboard"); } }); The code to check if the user is logged in correctly works, but the included file references the same …

Member Avatar
Member Avatar
+0 forum 2

I m trying to open another .py file into .py file.i have written code for display list one it added in database but for that i need to go in menubar and click on list menu. i want to open that list one recore added into database. Any suggesion.

Member Avatar
Member Avatar
+0 forum 1

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 the database in another file that contains functions. So I've included the database file at the top of the page. Then that is what give me the error. So I tried putting the include at the top of the function I'm trying to use and I got it to work, …

Member Avatar
Member Avatar
+0 forum 1

I have fields in a table that are being constantly updated with the current time (each second). First, the controller calls a function to create the record in the database public function saveEntry($theuser='') { $data = array( 'theuser' => $theuser , 'dateentered' => date('Y-m-d') , //date('d-m-Y H:i:s') , 'gname' => date('d-m-Y H:i:s') , 'ldate' => date('Y-m-d'), 'ltime' => date('H:i:s'), 'ldatetime' => date('Y-m-d H:i:s') ); $this->db->insert('onlineusers', $data); } Then, after the view is called, an ajax function keeps updating the time on the database. The problem is that when ajax updates the database (with a simple .php update page), the time …

Member Avatar
Member Avatar
+0 forum 2

I want to know how can i use a servlet to generate a table (time table for example) dynamically in a jsp page? The result should come between header and footer inside a div (see the picture) http://img191.imageshack.us/img191/8942/nbo6.png <html> <head> <title>Time Tables</title> <link href="default.css" rel="stylesheet" type="text/css"/> </head> <body> <div id="header"> <ul> <li> <a href="#home"> <div id="logo"> </div> </a> </li> <li> <div id="user"> <h4>Welcome, <font color="red">admin</font></h4> <ul id="menu"> <li><a href="#notification"> Notifications </a> <ul id="submenu"> <li> <a href="#">Inbox</a> </li> </ul> </li>| <li><a href="#profile"> My Profile </a> </li>| <li><a href="#settings"> Settings </a> </li>| <li><a href="logon.jsp"> Log out </a> </li> </ul> </div> </li> </ul> …

Member Avatar
+0 forum 0

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 succesfully included using require_once in the other files. I set the include path to several values including / and . but to no avail. Any ideas?

Member Avatar
+0 forum 0

i have the db with serial no and reference no. serial no is auto_increment value. it is worked perfectly. but i want ref no column also as auto_increment value start with 0000001,0000002,0000003...., how to do that? i cannot able to add two auto_increment values in mysql.

Member Avatar
Member Avatar
+0 forum 2

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
Member Avatar
+0 forum 3

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 so I believe it's a scope issue, but I can't figure it out. index.php print_r($_POST); //Returns nothing, tried other ways too //lot's of variables being defined include 'sql_data_handlers.php'; //instantiating some things sql_data_handlers.php //some functions retrieving data from sql db and finally: include($DOCUMENT_ROOT . "page.html"); page.html //html stuff <?php //Some conditions …

Member Avatar
Member Avatar
+0 forum 2

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 the first page if viewed from a PC and on every page on tablet (I have a Samsung and assume the same results apply to tablets period). Thanks a bunch for the help. This is getting fruatrating. I'm done with the site except for this one stubborn problem.

Member Avatar
Member Avatar
+0 forum 8

How could I add a external library to the native c++ lirary path at Ubuntu to be found by #include from source code? I have some couple of sources that I try to include them by all the codes written on my machine thus instead of coping all the library every code I wrote, I plan to define it as a native c++ library that can be rached by all codes with single #include.

Member Avatar
Member Avatar
+0 forum 3

Hi, I have this website which I am developing, but it is having display problems. I have a directory called 'includes' which contains 'header.php', 'login.inc.php' and 'login_form.inc.php' 'header.php' - displays the normal doctype, meta tags, styles, etc. 'login.inc.php' - is the actual process of the login form once the form is submitted. 'login_form.inc.php' - is the actual display of the form. Then in the main root folder I have a file called 'index.php'. The code for this can be seen below: index.php <?php require ('./includes/config.inc.php'); require (MYSQL); // This processes the login form for a user to log in. if …

Member Avatar
Member Avatar
+0 forum 18

I need to include a simple contact form in either the sidebar or footer of an existing website so it appears on every page. This is not a WordPress site, I have seen there are several plugins for WordPress. I need a different solution. I am thinking a php include would be my best option. However, my php skills are minimal. Can someone out there point me in the right direction? Any advice would be much appreciated. I have searched all day and have yet to find a good solution.

Member Avatar
Member Avatar
+0 forum 2

I have ran into an issue when programming a plugin that is dependent on another plugin. The plugin in question has 3 different versions, all of them are incomparable with each other. Instead of writing 3 separate plugins, I would like to know which .jar file exists, and import the correct one. Note: The plugins in question are actively running on the server, and I have no clue what is running on which server. Thanks for your help.

Member Avatar
Member Avatar
+0 forum 3

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 C:\xamp p\htdocs\abc\test.php on line 12. Access denied for user 'ODBC'@'localhost' (using password: NO) private function insertToMysql() { include_once('connect_db.php'); $connection = mysql_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD) or die('Oops connection error -> ' . mysql_error()); mysql_select_db(DB_DATABASE, $connection) or die('Database error -> ' . mysql_error()); //Queries } I tried echoing the include_once and it returned …

Member Avatar
Member Avatar
+0 forum 3

need jquery file that i can include in my project. please send me

Member Avatar
Member Avatar
-1 forum 2

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 you: thumbnail.php: <?php if(!function_exists("makethumbnail")) { //die("right before function definition"); function makethumbnail($src,$new_name,$new_width,$new_height) { die("inside makethumbnail"); $si = imagecreatefromjpeg($src); $w = imagesx($si); $h = imagesy($si); $vi = imagecreatetruecolor($new_width,$new_height); imagecopyresampled($vi,$si,0,0,0,0,$new_width,$new_height,$w,$h); imagejpeg($vi,$new_name); } } ?> index.php: <?php require_once("shopsite/thumbnail.php"); require_once("shopsite/checksession.php"); die("made it past the require_once"); $con = mysql_connect('localhost','jddancks','csc255'); mysql_select_db('test',$con); $q = mysql_query("select prod_name,image_name,type1,type2 from Product",$con) …

Member Avatar
Member Avatar
+0 forum 18

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 on pages where those subroutines are to be used. I understand that creating a Perl module/package may be more desireable, but for the purposes of this topic, I am trying to figure out how to get 'do' to work. Feel free to make comments and recommendations as far as creating …

Member Avatar
Member Avatar
+0 forum 2

Warning: include(funck.inc.php): failed to open stream: No such file or directory in C:\xampp\htdocs\search\index.php on line 2 Warning: include(): Failed opening 'funck.inc.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\search\index.php on line 2 help plz what i have to change

Member Avatar
Member Avatar
+0 forum 5

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
Member Avatar
+0 forum 2

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 include the IE menu.php? I know how to do the conditional comment, and include, just looking for a way to do a remove file.

Member Avatar
Member Avatar
+0 forum 2

Hi I started graphics programming only recently so im still a beginner at it. I've tried a snippet from online for c++ and I always get the same error message, Cannot open include file: 'stdafx.h': No such file, please help because Ive looked around this forum and I cant understand how to fix this.

Member Avatar
Member Avatar
+0 forum 1

The End.