include

Including file in PHP ?

I am developing an application where I have a requirement that I have to include multiple files, as follows: File1.php will include File2.php File2.php will include File3.php File3.php will include File4.php Now, what will be the best and optimized way of doing these. I tried with include() but I think its slowing down my server as ...

ASP.NET equivalent of server side includes

Although the classic ASP method of server-side includes works in ASP.NET, I get the impression it is not the preferred method. How am I "supposed" to be achieving the same effect? This is how I'm doing it at the moment: <!-- #include file ="functionlib.aspx" --> ...

Use a "User Macro" in .vcproj RelativePath

Inside .vcproj files There is a list of all source files in your project. How can we use a macro to specify the path to a source file? If we do this: <File RelativePath="$(Lib3rdParty)\Qt\qtwinmigrate-2.5-commercial\src\qmfcapp.cpp"> </File> The compiler cannot find the folder: qmfcapp.cpp c1xx : fatal error C1083: Cannot open so...

Is there extra overhead in absolute URLs for includes?

I have a situation where it looks like the easiest solution would be to convert from using relative to absolute paths for included files such as CSS & Javascript. There are around 10 included files in total per page - pretty much the same 10 on most pages. I'm wondering if there would be any significant overhead (or indeed downside, oth...

Entity Framework and Linq to Entities and .Include() few tables, or maybe ..

Hi. i've got a database with a table named PropertyValues where i store every value i need to describe some properties of my database table rows. For example, table Products which looks like this : ID OrderID //Products table is related with Order table ProductName ProductType_ID // ID of PropertyValues table which describes...

C++, removing #include<vector> or #include<string> in class header

I want to remove, if possible, the includes of both <vector> and <string> from my class header file. Both string and vector are return types of functions declared in the header file. I was hoping I could do something like: namespace std { template <class T> class vector; } And, declare the vector in the header and include it ...

How can I create a javascript library in a separate file and "include" it in another?

First, a caveat. The main script is not run in a webpage. I will be running the .js file in Windows using Windows Script Host. The problem: I would like to create a javascript "library" containing a number of objects, each with a number of functions. I expect this library will get rather large with time and would like to keep it in a se...

Where should I include JS files

Hello, I have a PHP application in which there is a div container which includes the app which has been $_GET from the URL string. Currently, there are two applications which require TinyMCE, and one application which requires jQuery and jQuery UI. Question is, where should I include the files on the page? In the header, the page lo...

Is there any way to get the current unit's name from an include file?

I'm porting some code from one framework library to another, which requires me to comment out large sections of code just to get it to compile, and then carefully restore them. In the meantime, I get tons of warnings because of all the commented-out code. So I decided to write a quick include file to suppress them: {$MESSAGE WARN 'War...

How to tell the preprocessor to search for a particular folder for header files, when I say #include <xyz.h>

I have around 120 header files(.h files) , and in all of them each one includes many other header files using #include , but as I kept .h files in a specific folder, preprocessor is generating filenotfound error. I moved all the .h files to the single .C file that is calling the first headerfile. One way to do is make #include as #inc...

Embed a web browser within a java application

how can i embed a web browser within a java application? Thanks, David ...

Entity Framework: Inheritance and Include

Assume the following hierarchy: class Department { EntityCollection<Employee> Employees; } class Employee { string Name; } class RemoteEmployee : Employee { Country Location; EntityReference<Country> CountryReference; } So, department contains a list of employees. There is a hierarchy of employee types, some types reference other e...

PHP Templating Looping Results

Hey! So here at work we have a home grown templating system, that is light weight and works great for us so far. The wall we're hitting is that we want to be able to loop over a template. The use case is something like search results. We are trying to think of ways that we could do this. We've come up with three ways right now. F...

Building a project with files pending on a parameter

I am trying to find a way to build a C/C++ project to only include certain files depending on an input i.e, if its parameter a include files 1-5. parameter b include files 6-10, etc etc. Basically a script or something to build a project based off of an input for visual studio. Only ideas I have came up with is using preprocessor comma...

timeout include script in php

Hi, I'm including a local class that requests a file from a remote server. This process however, is rather unreliable (in the sense that the remote server is often overloaded), and I would have to wait a few seconds (about 20 or so) before the include gives up and continues. Now, I would like to have a time limit on the execution time o...

Anything wrong with this PHP

Can you see anything wrong with this code, or can it be optimised? Code from index.php, to include the file if(empty($_GET['t'])) { $folder = "apps/"; }else { $folder = str_replace("/", "", $_GET['t']) . "/"; } if(empty($_GET['app'])) { include('apps/home.php'); } else { if(file_exists($folder.$app.".php")) {...

What is the difference between extending a class and including it in PHP?

Can someone explain to me what the difference between include_once 'classb.php' class A { $a = new B } and class A extends B { $a = new B } is? What advantages/disadvantages are there to extending a class vs. including the .php file? ...

Include Perl in Java

Hi, Is there any way to execute perl code without having to use Runtime.getRuntime.exec("..."); (parse in java app)? ...

What comparable Javascript function can reference a file like PHP's include()?

What is the best way to reference or include a file using Javascript, looking for the closest functionality of PHP's include() ability. ...

Why Can't I Include A Blog?

I commonly run into a scenario where "the powers that be" want an exact copy of a page in multiple places on a website. Rather than actually duplicate the content, all I do is override the section in the nav that is highlighted, and then include the page. The final page looks something like this: <?php $top_nav_item_id = 'teen'; ...