1
голосов
3ответов
76 просмотров

Figuring out which files are included rendering a URL with PHP

How can I use php to determine which files are invoked and included given a url only. eg. the URL, www.mydomain.com/index.php might use: index.php includes.php content.html I want to give php the url and it return the filenames. Thank you :-)

24
голосов
4ответов
39898 просмотров

How to implement precompiled headers into your project

I understand the purpose and reasoning behind precompiled headers. However, what are the rules when implementing them? From my understanding, it goes something like this: Set your project up to use precompiled headers with the YU directive. Create your stdafx.h file and set that to be your pr...

1
голосов
1ответов
285 просмотров

How do you debug functions from includes in Erlang?

The implementation of ScrumJet on GitHub (as of this writing) shares essentially identical functions between the storage modules for tasks, categories and boards. This was achieved by moving the identical code which makes heavy use of the ?MODULE macro into scrumjet_datastore.hrl. Each of scrum...

0
голосов
1ответов
1521 просмотров

VcProj or VcxProj Build Include Tag Question

i would like to edit the vcproj to include some additional header, additional dependecy and lib file. What is the correct tag ? Any script that generate this vcproj file ? My vcproj has this Environment="PATH=$(QTDIR)\bin;$(PATH)" and my settings has this Additional Include Directory .\Gener...

0
голосов
1ответов
4407 просмотров

OpenCV can't read image!

I am using this code: #include <stdlib.h> #include <stdio.h> #include <math.h> #include <cv.h> #include <highgui.h> #include <cxcore.h> #include <cxtypes.h> int main(int argc, char* argv[]) { IplImage* img = cvLoadImage( "dow2oc8.png" ); cvNamedWindo...

0
голосов
4ответов
247 просмотров

PHP includes Statement

I was wondering how include worked. i thought it was making 2 files or more into one big file for example file 1 includes file 2. file 1 is in the root directory while file 2 is in root/include/file2. so if file 2 needed to include something from the root/include directory then instead of putt...

0
голосов
3ответов
923 просмотров

PHP includes and POST

I'm developing a website and in my attempt to make friendly URLs without recurring to mod_rewrite (because chances are my client's server doesent allow it), I came up with this system: index.php expects a variable called $seccion, which should contain a relative path to a second file with a part...

14
голосов
9ответов
10282 просмотров

PHP robust include to handle errors?

I have a PHP app "index.php" that, for various reasons, needs to run other PHP scripts by using include_once on that other script. That other script isn't very stable, so is there some way to do a safe include_once that won't halt the caller? i.e.: <?php safely_include_once('badfile.php');...

31
голосов
8ответов
15731 просмотров

How secure is PHP?

I am somewhat new to PHP coding and I am aware that malicious users can hack a website if you have not sanitized your PHP code. What I am wondering is whether they need a data entry box (like for file submissions, or user-name/password entry fields)?. Do commands like "include (header.php)" als...

1
голосов
2ответов
88 просмотров

Including always changing code into an active program

Take the following function as an example: void Changing(string var1, string var2, string var3) { } I have code written in .txt files, and I want it to be dynamically loaded into that function. Potentially the code could be different every time the function is called. How could I do this? Co...

0
голосов
3ответов
223 просмотров

Including JavaScript file into main document

I have a jquery-code which using selectors (from current document). Now I want to move this code into another file(js) and just include from this document. Could I do it without any editing? So, will jquery-code works right?

0
голосов
1ответов
1393 просмотров

Ado.net entity .include() method not working

I've got this function public static AdoEntity.Inspector GetInspectorWithInclude(int id, List<string> properties) { using (var context = new Inspection09Entities()) { var query = context.Inspector; if (properties != null) { ...

1
голосов
2ответов
862 просмотров

Rails include with options

Is it possible to limit an ActiveRecord :include to say only pull one record? Item.find(:all, :include => [ :external_ratings, :photos => LIMIT 1 ]) I have a list of items, and each item has between 5 and 15 photos. I want to load a photo id into memory, but I don't need all of them...

10
голосов
5ответов
10442 просмотров

How to use a PHP includes across multiple directories/sub directories with relative paths

I'm having difficulty with paths in a cms system I'm attempting to build, I've basically got a folder with my header.php and footer.php files inside. These are included in index.php and work fine. But then when I attempt to use the same includes in a file within my admin sub directory, the image...

3
голосов
3ответов
1715 просмотров

PHP is_readable trouble with open_basedir

I've recently gotten an error when I deployed an application. It used "is_readable" on a path within the include path, but one that was restricted by "open_basedir". This gave me a fatal error. Is there another function that I could use to see if a file is includable, before actually including it...

1
голосов
5ответов
4067 просмотров

Is there a light-weight client-side HTML include method?

I'm looking for a light weight method for client-side includes of HTML files. In particular, I want to enable client-side includes of publication pages of researchr.org, on third party web pages. For example, I'd like to export a page like http://researchr.org/profile/eelcovisser/publications ...

0
голосов
5ответов
1081 просмотров

PHP not letting me pull defined variables from external config.php

I'm moving a PHP site from development to a production server and testing the new database connection. I have a config.php page that has only this (but with real data): <?php // Database Constants defined('DB_SERVER') ? null : define('DB_SERVER', 'xxx.xxx.xxx'); defined('DB_PORT')...

1
голосов
2ответов
2007 просмотров

Include view file within same namespace in PHP 5.3.0

I started developing sort of a mvc framweork on PHP5.3.0 for the static keyword, but since I'm here I said I should take advantage of the namespaces as well. So I have something like this for the view: namespace view { function load($filepath) { include($filepath); } fun...

0
голосов
1ответов
147 просмотров

Custom library files and web application on shared hosting?

Let me put my issue defining a real scenario: I am using dedicated server where PHP and MySQL are available. My PHP include_path=/var/local/php I am developing a custom cms application, where I am writing my own library which is responsible for communicating with the database and retrieving da...

4
голосов
2ответов
311 просмотров

Linux Reference for C++?

I want to know if there is any site like cpluplus.com which explains all the headers files and its available features, but for Linux ? Like for example explaining the sys/, net/, dns/* includes ? I came up with this question because I was searching for a sys/reboot.h reference. Any Ideas ?

0
голосов
1ответов
7861 просмотров

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 ${SOU...

7
голосов
4ответов
12216 просмотров

C++ std::system 'system' not a Member of std

I receive an error compiling a C++ program in which of the lines makes a call from "std::system(SomeString)". This program compiled 3 years ago, but when compiling it today, I receive an error that states ‘system’ is not a member of ‘std’. Is there something that I must import to use std::system,...

15
голосов
4ответов
29202 просмотров

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 file extension, thus... css.php. 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?

2
голосов
2ответов
1507 просмотров

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.

1
голосов
2ответов
6607 просмотров

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 pa...

22
голосов
5ответов
21885 просмотров

Cross referencing included headers in c++ program

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 Header...

0
голосов
12ответов
1859 просмотров

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

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 i...

5
голосов
5ответов
1749 просмотров

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) { ...

8
голосов
3ответов
9508 просмотров

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>...

1
голосов
6ответов
361 просмотров

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 arra...