I was wondering if there was anyway in the .htaccess file to access bash scripts.
I want to do this because for the mod_rewrite configuration:
RewriteBase /home/ { whoami } /www/
is there any equivalent way of doing a text substitution with whoami command within the RewriteBase line?
Thanks,
gsherp
User Profile
Collapse
-
Yeah...that is good. Thanks for all the help -
I guess it goes down to this question....doe s one need to initialize a variable in php before using it?
do i have to do this:
or can I just forgo the $variable=0; statement?Code:$variable = 0; .... $variable = $variable2 + $variable3;
Thanks for all the helpLeave a comment:
-
Don't I need to initialize it.....like set it to the value of 0. In case someone tries to access that array before it is ready. I don't want it to return a null or some random value.
You declare the array name. The size is unknown. How do you initialize it without putting the array in a loop to set all the values at all the indexes to 0?
hope that was clear.Leave a comment:
-
initializing 2d arrays in php
How do i initialize a 2d array in php,
if i use the 2d array in a class declaration.
since I don't know how big size is going to be, ie...how many rows...Code:class ANIMALS { var $array[ ] [ ] = 0; //?? how do I initialize the array if I don't know what the size is going to be... ..... }
How do I initialize it? say array was rows x 5 (columns)... rows is supposed... -
thread safe classes
How does one go about making a class that is thread safe?
Say we created the simple animal class
how do i go about to ensure that this class is thread safe.Code:class animal { public: virtual void eat() const { cout << " I eat like an animal. " << endl; } virtual ~animal() { } }
I am new to the multi-threading subject.... -
How to detect ip address of remote computer
I am trying to determine the ip address of a remote computer accessing my webpage. I do this to determine if the user if logged on elsewhere. If so, the server will reject actions from the previous location and log the user in from the new location. However, since all the computers are behind the gateway, I use $_SERVER['REMOTE_ADDR']; and only get the static ip of the gateway. Is there anyway to find out which specific computer is trying to... -
I tried using the onunload, but it will trigger after the user navigates way from the page...in my application the user goes from page to page looking at customer data.
So that is why i need to determine if the onunload occurred if the user clicked the windows [x] button.
As far as cleaning up on log out...
Customer Data is locked by a flag in the database when the user checks out for editing...there fore other...Leave a comment:
-
Firefox Execute Javascript Code when user closes window
How does one execute code when the user closes the browers window by clicking on the top right corner [x]. I need to log out user and do a database write when the user closes the brower. I do these to clean up the database when the user exits before actually logging out.
I was told to user pageX, but does not seem to work either. Again, I am having trouble with firefox.
Thanks. -
I found a simple solution avoid the conflicts with using both mootools and jquery
togethor. I just use the jquery no conflict option and in mootools...afte r some searching on the internet, just don't use '$' when calling a function.Leave a comment:
-
Does the browers load the <script src="..."> file at the beginning when the page loads? Once the <script> file is read by the browers, does it read it again?Leave a comment:
-
<SCRIPT> in HTML / Multiple js frameworks
Is there any way to dynamically change what script included in the HTML?
Is there anyway for the <script>...Code:<span id="changeit"><script src="test1.js"></script></span> <input type="button" onClick="document.getElementById('changeit").innerHTML="<script src="test2.js"></script>" /> -
The onblur only works if inside the span element there is an input field.
then the onblur is connected to the blurring action on the input field.Leave a comment:
-
Thanks for the reply.
I got around this problem by using an invisible input field in the innerHTML
This seems to work for me, so i decided to just go with this method.Code:document.getElementById(something).innerHTML = data + '<input name=datafield id=datafield value=data class=nosee>';
Leave a comment:
-
Calling Javascript function within innerHTML
Is there anyway to call a javascript function within an innerHTML call?
example:
...Code:var someelement = document.createElement("input"); var someelement2 = document.createElement("input"); function test(str) { var str2 = test.substring(0,4); return str2; } someelement.ondblclick=function(){ document.getElementById('someelement2').innerHTML='<input -
-
the innerHTML of a span element with text only, no form elements.Leave a comment:
-
capturing innerHTML content through POST
Hi,
Is there easy way of capturing innerHTML content when the user submits the form? I tried using a hidden input field which works, however...is there any other way of doing this without using hidden input field?
Thanks,
Dave -
onblur event not working for span element
I have an element that is a span. The span is filled in with data using innerHTML.
...Code:var celldes = row.insertCell(2); var des = document.createElement('span'); des.id='desc' + iteration; des.name='desc' + iteration; celldes.appendChild(des); des.innerHTML = " "; des.onchange = function(){ SOME CODE }; //WORKS des.onblur = function(){ -
Thanks,
I got around the problem by adding a autofill=false in the attribute section.Leave a comment:
No activity results to display
Show More
Leave a comment: