Hello,
I am running a huge import to my database(about 200k records) and I'm having a serious issue with my import script timing out. I used my cell phone as a stop watch and found that it times out at exactly 45 seconds every pass(internal server error)... it only does about 200 records at a time, sometimes less. I scanned my phpinfo...
Thanks for the contributions so far - I can see now that $rowq is not a single array but lots of them - I'd like to bring all the rows back in the array, any suggestions?
First off, the code which brings back my data into an array:
function fetch_questions($page) {
global $link;
$proc = mysqli_prepare($link, "SELECT * FROM tques WHERE ...
I tried dompdf. It's a lot easier to use than other libraries I've tried but it doesn't have unicode support. Or rather, it has unicode support but requires another library called PDFLib ($1k version).
So I am just wondering if anybody has ever stumbled upon or used any PHP pdf library which is both easy to use and has unicode support....
Hey all
Basically I want to replicate the page changing effect found here, at http://timvandamme.com/
But instead of using #values I want to use PHP includes, mainly because I want the site to be as uber-seo-friendly as possible... but still have this nice effect.
So is there a way of doing this? I have a main index file which include...
I have a suite of PHPUnit tests for my extension, and I want to run them as part of the extension's Hudson build process.
So I want to run PHPUnit specifying the extension library to load at runtime, but I can't figure out how to do this.
My directory structure is as follows:
/myextension.c
/otherextensionfiles.*
/modules/myextension....
Hello everybody!
I've been wondering whether is possible or not to pass a function as parameter in PHP; I want something like when you're programming in JS:
object.exampleMethod(function(){
// some stuff to execute
});
What I want is to execute that function somewhere in exampleMethod. Is that possible in PHP?
Thank you so much....
Here is a PHP statement that basically sets off a javascript image slider. Only problem is I can't figure out how to get each individual image to a link to a different page. Any tips or suggestions? I appreciate it!
<?php jsbrotate('height=316&width=924&imgdisp=4&imgfade=2&images=/wp-content/uploads/image_1_linked.png|/wp-content/upl...
I have some code validating a string of 1 to 32 characters, which may contain only alpha-numerics and hyphens ('-') but may not begin or end with a hyphen.
I'm using PCRE regular expressions & PHP (albeit the PHP part is not really important in this case).
Right now the pseudo-code looks like this:
if (match("/^[\p{L}0-9][\p{L}0-9-]{...
I have this PHP function, but it seems to give wrong results. Does anybody have an idea what's wrong with it (esp the formula)?
/**
* Finds a destination given a starting location, bearing and distance.
*
* @param array $startingCoordinates The starting coordinates, as non-directional floats in an array with lat and lon keys.
* @pa...
Hi all,
I've got the following regular expression that works fine on my testing server, but just returns an empty string on my hosted server.
$text = preg_replace('~[^\\pL\d]+~u', $use, $text);
Now I'm pretty sure this comes down to the hosting server version of PCRE not being compiled with Unicode property support enabled. The diffe...
I'm having problems getting the addAttributeToFilter function within a loop to behave in Magento. I have test data in my store to support searches for all of the following data;
$attributeSelections=array( array('size' => 44, 'color' => 67, 'manufacturer' => 17),
array('size' => 43, 'color' => 69, 'manufacturer' ...
PDO apparently has no means to count the number of rows returned from a select query (mysqli has the num_rows variable).
Is there a way to do this, short of using count($results->fetchAll()) ?
...
i have one text field and setting its name & values from php, like:
<input type="text" id="qtyProductID_' . $productID . '"
size="3" value="' . $totalItems . '" >
i also have image button for click event
<a href=fun.php?action=update&productID=' . $productID . '
onClick="return false;"><img
src="images/update.jpg" id="update...
Hello there.
I just recently started using this library (the one from CodePlex), but I ran into some issues. My goal is to use it so I can process some data from multiple Excel files, and send such data to a database, per file. I'm doing something like:
foreach( $file_list as $file ) {
$book = PHPExcel_IOFactory::load( $path . $fi...
I was just curious if Yii is supposed to be compiled into PHP or not. Is it possible to use Yii just by copying the Framework to a folder on the server and then including something (something as in one of the yii files- I am not sure how it works) in the scripts I wish to use the framework for?
(Noob when it comes to frameworks and usag...
I have a list of file names(I already have the filelist let's say in a text file). I want to process this list in the following way:
filenames of type /dirX/subdirX//.ext will be written in a new file
all the other filenames will be written in a separate file.
Is there any option to verify if a filename corresponds to a mask, without...
I'm in charge of at least one large body of existing PHP code, that desperately needs tests, and as well I need some method of checking the production site for errors.
I've been working with PHP for many years, but am unfortunately new to testing. (Sorry!).
While writing tests for code that has predictable outcomes seems easy enough,...
Here's the situation.
I have a site where clicking hyperlinks within a certain div makes a jQuery function get the content of a div from a separate page. Because of this, the URL don't change. I need it to change as well as writing an entry in history.
My pages are setup like this (not sure this is the smartest way of going though)
a...
Using Brian's suggestion below:
foreach($qs as $value){
echo "<tr>".$value['qnum']." is the questions number and the question text is ".$value['qtext'].". The page and q values are ".$value['page']." and ".$value['questions']." respectively.</tr>";
}
I get the following output from the array, which isn't right:...
Hi, I am using the following php code which has been given to me, it works fine, apart from the auto response bit. I know its not a lot of code I just don't know how to do it or why it's not working.
Any help would be appreciated. Thanks in advance.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/...