include

PHP - Get variables from another PHP file without executing the code?

Hi All, I'm trying to create a script to extract the variables from a file on the same server. The problem is, I don't know what else is going to be in the file all of the time (the script is for other people to use), so I don't really want to load all of the contents or execute any of the code. I've thought of using file_get_contents...

including header files in Dev C++

Hi i'm new here and learning C++ ive just created 2 very simple files , one hpp, and one cpp.. They are located in the same directory and I've added the directory to the C++ includes list through the 'Tools > Compiler Options' window. using the command #include "Cat.hpp" i get the following error 5 K:- C++ Excercises\Cat.cpp In ...

Applying the decorator pattern polymorphically and coupling problems in C++

I am trying to make a C++ implementation of the board game Carcassonne. I am trying to make a tile object which has four sides and one of three basic terrains(field, road, city). The best interface for tile creation I could think of was of the form: City city; city_city_city_city = new Tile(city, city, city, city); Where a Tile clas...

PHP include paths - include fails if file referred to with "./" prefix

I'm having issues with includes when the included file itself includes another file but refers to it with the dot prefix. For example there are three files - inc1.php, inc2.php, and subdir/test.php, the contents of which are - subdir/test.php: set_include_path(get_include_path().":../:../."); require("inc1.php"); inc1.php: require("...

How to pass parameters to PHP template rendered with 'include'?

Hi guys, need your help with PHP templating. I'm new to PHP (I'm coming from Perl+Embperl). Anyway, my problem is simple: I have a small template to render some item, let it be a blog post. The only way i know to use this template is to use 'include' directive. I want to call this template inside a loop going thru all the relevant blog...

ASP.Net - How do I include an embedded JavaScript file from another project?

I've got two projects, one is a control library and another is my main project. From the control library I am currently using a user control and some css files which are embedded in the control library. I can use the embedded CSS files in my main project by doing the following from my user control's PreRender event: // Register the d...

output text file contents inline in an ASP.NET page

I have some HTML text files that I would like to dynamically include in an ASP.NET page. What is the best way to do this? My first guess was to create a Literal control on the page and output as follows: litMyLiteral.Text = System.IO.File.ReadAllText("c:\path\to\file.htm"); Is this a good solution, or is there a better one? For me, ...

Dynamic including javascript with jquery

Hello people! I'm facing a problem using IE here. I need to insert a form on distinct web pages in distinct servers and domains. I'm doing this through a javascript include like this: <script type="text/javascript" src="http://www.sisgol.com.br/teste/write_js.php?content=form_content"&gt;&lt;/script&gt; <div id="form_hypescience"> </div...

declarations error in include and require functions

I write this code include('database.php'); function get_something() { database instructions } function get_another(){ database instructions } and I try to fix by this function get_something() { include('database.php'); database instructions } function get_another(){ include('database.php'); database instructions } ...

ASP - Determine if current Script is being run as an include

Lets say I have the following pages: # Include.asp <% Response.Write IsIncluded() & "<br>" %> # Outside.asp <!--#include file="Include.asp" --> I need this to work such that if I access http://Example.com/Include.asp directly, I see "True", yet if I access http://Example.com/Outside.asp I see False. I'd perfer not to have to add an...

Trouble including .js file into php

I am trying to include a .js file into a php file. My folder structure looks like this: root ---js (FOLDER) ------file.js ---blog (FOLDER) ------index.php ------js (FOLDER) ---------blog.js If I am using this: <script type="text/javascript" src="../js/blog.js"></script> it works just fine. What I can't seem to do is include file.j...

#include <> and #include ""

Possible Duplicate: what is the difference between #include <filename> and #include filename Is there a fundamental difference between the two #include syntax, apart from the way the path the compiler will search for? I have the feeling that Intel's compiler does not give exactly the same output. ...

Moving C++ Method Declarations from .hh to .cc File

I'm working on a C++ project in which there are a lot of classes that have classes, methods and includes all in a single file. This is a big problem, because frequently the method implementations require #include statements, and any file that wants to use a class inherits these #includes transitively. I was just thinking that it would be...

PHP parsing on includes

I'm including a file init.php which defines path constants. So if I include init.php in a file (index.php) and then in another file (layout/header.php)... is init.php parsed before being added to these files or is it added to the parent file and then the parent file is parsed as a whole? EDIT: Why this is important is because init.php d...

PHP Link problem

Hello, I have a head file which I am using for a few different pages. The problem is when I go into a folder, the links in the head file point to say index.php instead of ../index.php Is there any function to fix this or any work arounds that I'm missing?. Thanks! ~ Kyle G ...

Visual Studio auto-including (C#)

Is there a way to specify which namespace "includes" should be automatically added any time you create a new C# file in Visual Studio 2008? Thanks! ...

Source file organisation

I am having a bit of trouble organising my source files. I have my own small, but growing collection of code that I would like to use in various projects. The file and folder layout is something like this: library\sub1\source.h library\sub1\source.cpp library\sub2\source.h library\sub2\source.cpp One of my problems is that I want t...

PHP - Is it dumb to load <head></head> data as an include

This might be a really dumb question, but is it dumb to load the data that is in between the tags in a file and load it via PHP include()? That way it would allow for easier editing. Thanks. ...

php include, all paths get messed up.

Hello. When i use php include to include a page in my website all the paths in the file i include get messed up. The included page acts like it is in the same folder as the page im including from. Is there way to avoid/fix this problem? ...

Boost Include Files in VC++

For the last few years, I have been exclusively a C# developer. Previously, I developed in C++ and have a C++ application that I built about 3 years ago using VS2005. It made extensive use of the Boost libraries. I recently decided to brush off the old app and rebuild it in VS2008 with the latest version of Boost (the latest version w...