In my .htaccess file I need to turn on the following:
php_flag display_errors On
php_value error_reporting 2147483647
However I only want to do this if my IP is visiting the site.
Any ideas?
Something like...
if (ip == "x.x.x.x") {
php_flag display_errors On
php_value error_reporting 2147483647
}
Need to do this in .htaccess ...
If a variable will always be a number, is there a performace loss by putting it in inverted commas?
for example
"SELECT prod.product_name FROM prod WHERE prod.id = '$id'";
...
Hello !
Simple class for example:
class Foo
{
protected $_bar;
public function setBar( $value ) {
$this->_bar = $value;
}
}
And here is the question:
$obj = new Foo();
var_dump( empty( $obj ) ); // true
$obj->setBar( 'foobar' );
var_dump( empty( $obj ) ); // false
Is it possible to change class's b...
Hello.
Straight to the point:
I have this javascript:
for(item=1;item<5;item++)
{
xmlhttp=new XMLHttpRequest();
xmlhttp.open("GET",'zzz.php', true);
xmlhttp.send();
}
And in PHP file something like this:
usleep(5);die('ok');
Now the problem is javascript seems to be waiting for each ajax call to be completed before send...
Hi. i'm trying to built in support for locations in my application and i'm expecting users to be inputting gps coordinates in a variety of ways. I need to convert all of the below to: latitude - direction (N/s), degres, minutes, seconds; longitude (E/W) - degrees, minuts, seconds.
Note, each user input will be in a single line. I would ...
Hello
I'm trying to teach myself Drupal and I've found something I can't find any tutorials for.
I am trying to generate a form, with a dynamic number of text fields, to populate and edit the contents of my custom table. In regular PHP I would achieve this with:
$count = '0';
while ($row = mysql_fetch_array ($result) {
echo "<input ...
Hi guys. I'm writing an authentication script in PHP, to be called as an API, that needs to return 200 only in the case that it approves the request, and 403 (Forbidden) or 500 otherwise.
The problem I'm running into is that php returns 200 in the case of error conditions, outputting the error as html instead. How can I make absolutel...
My primary question is:
Is this alot of loops?
while ($decimals < 50000 and $remainder != "0") {
$number = floor($remainder/$currentdivider); //Always round down! 10/3 =3, 10/7 = 1
$remainder = $remainder%$currentdivider; // 10%3 =1, 10%1
$thisnumber = $thisnumber . $number;
$remainder = $remainder . 0; //10
$decimals += 1;
}
Or could...
Hey all, just wondering how I can add 30 seconds on to this?
$time = date("m/d/Y h:i:s a", time());
Thankyou, again.
I wasn't sure how to do it because it is showing lots of different units of time, when I only want to add 30 seconds.
...
This menu will need to be updated daily.
<html><head></head><body>
<h1> Welcome to Burgerama </h1>
<?php include("menuBuilder.php");
showBurgerMenu();
?>
</body></html>
Menu items are stored in the database. Items have a display field; if it is on, the item should be displayed on the menu. The menu only displays 4 or 5 "specials"...
Hi, how can change only the last letter of any word of a string with regular expressions?
I use mb_strtolower() for change strings from upper to lower in Greek language and I have problem with final 's'.
...
SORTED
http://drupal.org/node/467190#comment-2068324
Hi friends,
I've spent all day to find but can't find :(
How can I display CCK Field value with php in views_customfield? I tried the ones below, but no result
$node->field_homepage_linking[0]["view"]
$node->field_homepage_linking[0]["value"]
value_get('field_homepage_linking...
I have a an array I want, whenenever i submit my form the post value get inserted into that array, every time with new incremented index..
How can I do that? And yes submited page is redirected to itself...
...
Why are scripts given .phtml extension while working with zend framework?
...
I get an unneeded number combination.
($_COOKIE):
2, 3, 4, 5, 6, 7, 8, 901234567890123456789, 30
Should be ($_COOKIE):
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12... (till) 30
$_Get['id']="1"; (sorry, forgot to post it.)
Why that happens?
The code:
<?
ob_start();
$id=$_GET['id'];
if (!empty($id)){
$id=str_replace('a9_',''...
I have developed a website, using Twitter API. Now a little but important problem I am facing is expected URL.
There will be users on my site who are going to get details with their user name.
My site url right now is : www.mysite.com/
It also works on : www.mysite.com/home.php
and : www.mysite.com/FinalShow01.php
Now what I want is us...
I use cakphp version 1.3. The documentation says, that if I want to use the translation behavior for my dynamic content no changes in my view are necessarily. The problem is, that the translated fields are there but empty. The translation only appears in the ['I18n'] array like this
Array
(
[0] => Array
(
[Cat...
Hi
I have a message box in my project if one have to check some message they have to enter the message link to check message instead ,I am thinking of showing a message in a popup box if the query where i am fetching the messages is not empty ,,(i,e) if there is any unread message in users account must,trigger a popupbox with message...
Is there some kind of trick involved? Here's how I would envision it working:
1) User tries submitting the form
2) Event.observe captures this and sends an AJAX request to a special validation URL (PHP using Codeigniter)
3) If no errors were returned, continue submitting the original form
4) If errors were found, cancel form submiss...
Hi,
I have the link below that executes the action message/new which shows a
form inside a jqueryui modal dialog.
<div id="myDialog">
</div>
echo jq_link_to_remote('Enviar mensaje', array(
'url' =>
'mensaje/new?receptor='.$miembro->getId().'&tipo=0&estado=0',
'update' => 'myDialog',
'complete...