for example I do have 5 PHP functions on a page which execute when loading. each functions has its own processing time and some of them take more time sometimes to complete the task. hence the total loading time of the said page is slow.
my question is how do I control execution time for each script and set time limit for the same. I am...
Hi,
I am new to OpenID, and want to implement Google OpenID authentication on my website. I could not found any example.
Can anyone suggest me some good tutorials (step by step) or any working example with code to implement Googl OpenID authentication using PHP.
All helps are appreciated.
Thanks,
Navin
...
Hi there,
I am passing hidden value, and getting it into javascript function. I want to pass this value to another page. Before passing when i print it, it gives me [object HTMLInputElement]
$var4 = 1;
echo "<input type='hidden' id='var4' value='$var4'>";
and accessing it in javascript
var y = document.getElementById('var4');...
Hi,
I am using below code to find an array inside parent array but it is not working that is retuning empty even though the specified key exits in the parent array
$cards_parent = $feedData['BetradarLivescoreData']['Sport']['Category']['Tournament']['Match'];
$cards = array();
foreach($cards_parent as $key => $card)
{
if ($key ===...
hi,
I am using mysql driven application where in all data comes from mysql and display it using php.
when designing the DB what all precautions must be taken so that mysql gives best performance.
i had a small doubt . I have text column in my form , and i dono how much length data will be entered . So instead of varchar(255) if i c...
I have a Zend Controller that serves files to users
I have used Noginn SendFile action helper to do the actual streaming of the file, but the code simply uses readfile($path) to place the content of the file into the buffer after setting the MIME and content type etc
The problem is that the file that arrives down the pipe has an extra ...
I would like to have domain.com using asp.net mvc2 technology and domain.com/blog would use php. Is it possible to do this on server and to isolate this folder to use php? I know that it is much easier with subdomain (blog.domain.com) but I'm interested in subfolder solution.
...
Hello
<?php
$airports = array('LED','DME','SVO','VKO','AER','KRR','IKT','KGP','KHV');
if ($content = getData('LED'))
{
return $content;
}
Need to go on line through the array until the content is not empty!
How?
Sry for bad english
...
This works:
!function_exists('testfunc') and include("testfunc.php");
This will report syntax error:
!function_exists('testfunc') and unset($q);
Aren't they the same thing?
...
Hi,
I've wrote a PHP code, that downloads an excel file when the user clicks a button on the page. The code connects to db and use some stored functions which do some calculating multiple times so the execution time takes so long. I ran the code at localhost several times and everyting went well. But when I tried to run in my web server...
I recently started learning zend framework. I am trying to access the index.php inside the public folder, but when i test the project using WAMP server in browser, I can't find the public folder in the web root. I can see other folders like applications, library, docs but there isn't any public folder.
Why can't I view the public folder...
I have a Database in Local server named 'empData' and i want that all the data from that database to be copied to another Database, which is in the another server(web server) with the name 'empDataBackup'.
I have tried this code mysql_query("INSERT INTO empData.backup_emp SELECT * FROM empData.emp");
But it did not work as both the dat...
I know, silly question but what do I put where?
I post data to a php processing page:
$insert = mysql_query('INSERT INTO '.$table.' ('.substr($addfields,0,-1).') VALUES ('.substr($addvals,0,-1).')');
a bit like that
I want to have
if($insert): echo 'Message 1'; else: echo 'message2'; endif;
what do I do in my success: function(...
Hi I'm new to OOP with PHP. I'm wondering how OO comes into play when selecting data from a table. i.e. i have a users table and a user profile page. So I have a User class. Do I select the user data from the table then create a new object of class User and define the properties?
Thanks for anyone that can clear this up for me!
Regards...
I am developing a web application which is using php. It will use the mySQL database for storage. But The application may upgrade in future, so I would like to know is there any framework for me to reduce the pain of upgrading database structure. I know that there is a framework called cakePHP. And the application will deploy in more ser...
Hi there!
I'm using Zend framework, and most of the action controller that I have return XML response.
In order to do this, I have to initialize context switching and provide URL suffix "?format=xml" to call each action.
Is there any way to make this default? So I don't have to add this suffix each URL?
Regards, Andree.
...
Hi, I use PHP to generate files of some special format, and I have decided to try the same thing with Ruby. To make a file with PHP, I use the following code:
<? include 'functions_and_settings.php'; ob_start() ?>
some parts of another format
<? // php functions generating file content,
// including other formatted files ?>
some ...
Here is my query:
$query="Delete b
Where Exists
(
Select 1
From a
Where a.poster_password = '$pass'
And a.ad_id = '$id'
And a.classified_id = b.classified_id
)
Delete a
Where a.poster_password = '$pass'
And a.ad_id = '$id'";
I get this error:
"You have an error in your SQL syntax; chec...
Hey there!
I'm trying to write a sync function that saves some data to nodes, which works fine, until I try to save the thumbnail image associated with the node.
I've managed to download the file and put it in my sites/default/files folder, but what's the best way to tell Drupal, "put this file in that CCK imagefield"?
EDIT
To clarify...
I have a wordpress website up and running that is reasonably popular but over the last couple of days my performance has degraded terribly.
I have installed Jet Profiler and have been monitoring the MySQL database to see if I can find something wrong and this one query is consistently the worst offender.
SELECT SQL_CALC_FOUND_ROWS wp_...