» Home » included » Page 1
Scoping issue with global when called from included file included within a function?
by hyperNURb in Programming Languages

I have a file, standalone.php, that's meant to be run as its own script, directly from the browser. It defines functions, classes and includes other files. It works fine when directly invoked.


It has code in it like this:


$DB = new Database(DB_DATABASE, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_SERVER, ', true);
function DB() { global $DB; return $D

If an externally included file (e.g. JavaScript or CSS) is included twice (or more) on a page will there be two (or more) web requests?
by uo7 in Javascript

Let's say because of a conditional comment or just being careless the same included file is present for users of some browser or even all browsers. For example:


<!--[if lte IE 8]>
<script src="mygreatincludefile.js" type="text/javascript"></script>
<![endif]-->
<!--[if lte IE 6]>
<script src="mygreatincludefile.js" ty

Android res/layout Folder not included in the APK file (but included in the ANE)
by Kubla Khan in Programming Languages

I'm having a problem with resources on an Adobe ANE Android extension:


android.content.res.Resources@NotFoundException: id.myView


I have a xml layout file, which is included in the ANE file (checking by unzipping the ANE file and looking into META-INF/ANE/Android-ARM)


In the APK file (generated with Flash Builder 4.6), the layout


PHP: How can I reference variables from an included file before it's been included?
by ShayH in Programming Languages

How can I reference variables from an included file before it's been included? Or can I somehow include the file (so I can lead its variables later) before its HTML is literally inserted into the body tag? Or can I contain all of home's body content in one big variable that I can echo as well in the index?


Here's what I'm trying to do:


index.php


<html&

Call function of included JavaScript code from another included JavaScript
by Dave Lievense in Javascript

I'm trying to work with different loaded JavaScript in my page, but I'm not able to let them talk.


<html>
<script type="text/javascript" src="jquery144.js"></script>
<script type="text/javascript" src="shared_functions.js"></script>
<script type="text/javascript" src="page_function_callers.js"></script>
&l

How come non-globals from included files are usable in relative urls and unusable in full urls of included php files?
by YBS1 in PHP

when I include vars.php:


$var='hello';

in index.php:


require 'vars.php';
echo $var;

it works great, even though $var is not global. but when index.php looks like this:


require 'http://site.com/vars.php';

echo $var won't work. How can I make it work anyway?


Rewriting included div from another included div
by luv2liv in Programming Languages

I have a code sniplet edited from a tutorial, for rewriting a div from a file.
The file using this code is in a separate php document,
and I use include to show it in the main document.
(Reason for that is that's I'm rewriting part in it with php code, so it needs to refresh).


$(document).ready(function() {
$('#pl').click(function(){

PHP Using an Object from an included file in another included file
by swinaz in Coding

I will be straight to the point with this. Can't seem to find it anywhere on the internet. Maybe it is not even possible, i dont know. I do really like to use the method "divide and rule", created it myself. Splitting as much files as possible for easy management (small files and such).


But here is my problem:


I have 5 files:


index.php
inc/config.php

Getting the value of included jsp in js
by Russia in Web Design
I'm using struts 2 application where
< s: form name="myForm">
< s:include value = "test.jsp" >< / s:include>
< img src="../../images/next.png" onclick="fnNext();"/>
< / s:form>
test.jsp contains a table with id = "my table"

Now how use the id of the table in javascript function fnNext():


amp is included in url struts tag
by rainy in Programming Languages

In my web application, I use strust2 url tag to pass parameters like id etc., For example, I use a link to delete an entity and I use param to pass the id of the entity to be deleted. And I follow this throughout my web app for adding, editing, deleting an entity.


During run time, sometimes, I don't get the params to be stored in my action's bean properties. When I see the link tha

TAGS : included struts

Next



Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .