include

How to implement "Maintenance Mode" on already established website

I have built a fairly robust website (PHP) with more than 60 pages. I have only now realized (unfortunately) that I should have built in an "In Maintenance Mode" feature to allow an admin to temporarily disable the website and point it to a Maintenance Mode page. This would only allow those logged in as an admin to view the website. T...

PHP5 include() Problem

Hi all, So, I've got task from my boss to install opendocman on our newly installed PHP5 running on openbsd. When I try to install opendocman on my ubuntu laptop (running 9.04) it was run smoothly. But, when I try to install in on server, I've got these error: Warning: include(templates_c/%%0E^0E4^0E407559%%footer.tpl.php) [function.in...

Include the result of a Foreach loop in a variable in PHP ? ( for the function mail() )

Hi, I'm French so I maybe not speak english very well. I'm trying to "put" the result of a foreach loop in a varible like that : $msg = '<html><head> <title>Commande de photos</title> </head><body> <p>Voici la liste des photos demand&eacute;es :<br /> <ul> HERE I WANT TO "PUT" THE RESULT OF THE FOREACH LOOP</ul>'; H...

root path doesnt work with php include .

Hi. / in the beginning of a link to get to the root folder doesnt work in php include. for example "/example/example.php" What is the solution? ...

Refresh PHP include();

Hi What is the best way to refresh the content of a var that is included? For example i have this code: <marquee> <?php include('note.php'); ?> </marquee> This is great, as i can show on the page the contents of note.php - say i change note.php but i dont want users refreshing to see the changes... is there any way...

How to include the sqlite3 library "libsqlite3.0.dylib" in my application source file?

I am writing an application in C++/C/Object-C cocoa environment for OSX 10.6 For specific reasons, I cannot make changes to the make file so that I can not link the "libsqlite3.0.dylib" library during build. In my source files, I included . Since I cannot link the library with the framework, I was wondering how can include a library as...

C: Inclusions within Headers

If I have the following: /* * example.h */ #ifndef EXAMPLE #define EXAMPLE #include <stdio.h> extern int parse_string(FILE *, char const*, const unsigned int); #endif Will this mean that code that uses ... #include example.h ... won't have to ... #include example.h's ... dependencies ? ( ie: #include <stdio.h> ) ...

Should the Applicant class "require 'mad_skills'" or "include 'mad_skills'"?

Also, what does "self.send attr" do? Is attr assumed to be a private instance variable of the ActiveEngineer class? Are there any other issues with this code in terms of Ruby logic? class Applicant < ActiveEngineer require 'ruby' require 'mad_skills' require 'oo_design' require 'mysql' validates :bachelors_degree def qual...

Fastest way to load/include PHP template?

I have a function that loops through different types of listings pulled from MySQL and displays them as a Facebook-esque "feed". Each type of listing has a different appearance, and therefore requires a different template. Here is the below function example might be called 100 times (if there are 100 listings): function display_listing...

How to include a dynamic library in a makefile build

I am writing a program in Mac OSX 10.6 environment. In my make file, I would like to include a dynamic library /usr/lib/libsqlite3.dylib as part of my build I am not familiar with make file syntax from what I have read over the internet, I believe I have to add -lx /usr/lib/libsqlite3.dylib please advise me on whether or not this is c...

use ${property} in a properties file ?

Hi, look at my "file.properties": key1= My name is key2= ${key1} Martin ! Why when I get the value of "key2" my result is "${key1} Martin !" unlike "My name is Martin !" => I program in Java 6 => I use java.util.Properties ...

No simple way to "include" in Java?

When logically something seems as if it would be dead simple, then it turns out to be completely convoluted, I have not used Java much, so please forgive my ignorance. Here is what I am trying to do: I have a nice clean algorithm in one .java file, and I want to feed it from an initialized array. The array contains over 40,000 elements...

How can I make a php script add a tab to every line of an include file?

Within my HTML, I have a php script that includes a file. At that point, the code is indented 2 tabs. What I would like to do is make the php script add two tabs to each line. Here's an example: Main page: <body> <div> <?php include("test.inc"); ?> </div> </body> And "test.inc": <p>This is a test</p> <div> <p>This i...

Including source files in C

So I get the point of headers vs source files. What I don't get is how the compiler knows to compile all the source files. Example: example.h #ifndef EXAMPLE_H #define EXAMPLE_H int example(int argument); // prototype #endif example.c #include "example.h" int example(int argument) { return argument + 1; // implementation ...

Printing the contents of a file using the #include directive (preprocessor)

Hi, Say i have a file, t.txt, that contains the following two lines: one two Now, I would like to write a program which will #include that file somehow and print its contents, nothing more. That is, i want the contents of that file to appear in my code as a static text, at compile time. Any ideas? The reason im asking is this: I ...

Cross referencing included headers in c++ program

Hello, I am curious about a scenario set up like the following example: Here is code that would be placed in a file called Header1.h: #ifndef HEADER1_H #define HEADER1_H #include "Header2.h" class Class1 { Class2 class2Instance; }; #endif Here is code that would be placed in a file called Header2.h: #ifndef HEADER2_H #define HE...

How to include files with HTTPS - PHP

I made a form process and broke the code up into different files to stay clean and organized. Now I am setting up the form for https security. Do all the files I pull into my page have to be called as https as well? In which case I can no longer use include(); as it no longer allows relative paths? Is the solution to use file_get_cont...

Where is function's declaration in bash?

In my script in bash, there are lot of included libs and I use functions declared in these files. Like this: #!/bin/bash . foo.inc . bar.inc . baz.inc function_1 function_2 function_3 EOF My question is how to learn which file include function_1 declaration? In runtime of this script. ...

Include: css with php file extension??

I'd like to wrap a css file in php... So I write the header for the css file and give it a php extension, thus... css.php. The question is will this work if the page is already being used as an include... or will this new header clash with the frame the page is being included into???? ...

How to include directories in cmake generated visual studio projects?

I have (roughly) the following CMakeLists.txt project(Test) set(SOURCE 123.cpp 456.cpp ) find_package(Boost COMPONENTS unit_test_framework REQUIRED) include_directories(${Boost_INCLUDE_DIRS}) link_directories(${Boost_LIBRARY_DIRS}) message("${Boost_INCLUDE_DIRS}") add_executable(Tests ${SOURCE}) The message generated by message...