I have this file upload and it works in Firefox fine, but when I upload file n IE and filename has umlauts, then filename is corrupted. After file is uploaded I echo filename and filename is corrupted like in my example.
Example:
ä.png is converted to ä.png
...
Hello,
I am working with a database that has a table called date, which contains a separate field for day, month, year. Clearly this is not ideal when I am trying to run comparisons, etc. I am wondering is it possible for me to add a DateTime field to each row of this table and insert a concatenated string into the new field from the ex...
private function find($needle, $haystack) {
foreach ($haystack as $name => $file) {
if ($needle == $name) {
return $file;
} else if(is_array($file)) { //is folder
return $this->find($needle, $file); //file is the new haystack
}
}
return "did not find";
}
Hey, t...
Possible Duplicate:
Convert array into csv
Hi,
How to convert array into .txt file?
This is my array:
Array
(
[OrderList_RetrieveByContactResult] => Array
(
[OrderDetails] => Array
(
[0] => Array
(
[entityId] => 1...
This is a simple question. I am using the libmail class to send my mails. For composing the mails I am using the CKEditor. My problem is that when I send the mail to someone the mail is displaying like this:
<p><span style="color: rgb(255, 160, 122);">data</span></p>
I already tried this:
$message = htmlspecialchars(stripslashes($mes...
Hi there,
I have a table in which there are fields like user name, name, age, activity. In this if new user is added then an image is shown beside that user name.
Until now sorting was done by activity by default, but I want all the newly added users to be shown first in the table by default, how can i sort in this case?
Any hint? ...
Is there a good modern comparison (last couple years) of how Java performs and scales relative to PHP in a modern web application environment (Twitter, Facebook, COMET push)
Is there any type of canonical web application that would be best to compare the 2 languages?
(Full disclosure: I'm primarily a Java developer and I've worked with...
Can someone explain what is happening in this URL? (I pulled it off a basic Amazon search and shortened the url= portion)
http://www.amazon.com/s/ref=nb_sb_noss?url=whatever
My mains questions are, where is the file extension of the requested page ? Is the requested page indeed nb_sb_noss ? What sort of server architecture allows thi...
Hi,
I have a URL that's in this format
http://site.com/image.php?id=1
Each ID is a different photo, how can I save each image for 1000 ids?
...
When I try to save or delete the view this message appears ... when deleting the error is in function delete(), when saving the error is in function validate().
I'm trying to get answer for 2 days already, browsing the drupal forum etc.
I cannot get the solution.
I'M STUCK! I cannot continue my work! IT'S HELL!
People THANK YOU!
EDI...
Hi guys, I am trying to access a jQuery JSON object, and I can't see anything wrong witj my code, but all I get when I try to access the object is undefined, I was thinking that maybe it's because of the way it is nested, but I am unsure, here is my code,
function systems(dom_id, id){
$.getJSON("get_systems.php", {uid:id}, function(d...
Input is a URL like this http://ws.geonames.org/children?geonameId=6255148 and I would like to receive the XML file in a SimpleXMLElement for example?
...
I'm storing a file through GridFS and saving the id like so:
$file_id = $gridfs->storeUpload('texture');
$item = array(
'name'=>$_POST['name'],
'description'=>$_POST['description'],
'price'=>$_POST['price'],
'categories'=>$category_array,
'tags'=>$tag_array,
'file'=>$file_id
);
$collection->insert($item);
and...
Possible Duplicate:
Convert HTML + CSS to PDF with PHP?
I was searching for a way to convert HTML to PDF, but all I found was very limited.
...
I am using following regex to validate date in format dd/mm/yyyy in php:
preg_match("/([0-9]{2})\/([0-9]{2})\/([0-9]{4})/", $e_startdate, $matches)
But what will be the regex to validate time in the format 10:20 PM or AM. I want a regex which will validate following format for me.
<number><number><colon><number><number><space><AM or ...
Hi,
I'm running the following test in selenium-rc:
<?php
require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
class Example extends PHPUnit_Extensions_SeleniumTestCase
{
protected function setUp()
{
$this->setBrowser("*firefox /usr/bin/firefox");
$this->setBrowserUrl("http://www.google.com");
}
public function te...
Hi,
Im a newbie with regular expressions and i need some help :)
I have this:
$url = '<img src="http://mi.url.com/iconos/oks/milan.gif" alt="Milan">';
$pattern = '/<img src="http:\/\/mi.url.com/iconos/oks/(.*)" alt="(.*)"\>/i';
preg_match_all($pattern, $url, $matches);
print_r($matches);
And I get this error:
Warning: preg_mat...
Hi folks,
It's basically what the title says.. I have a form with a select control that I want to force the form to post back to self on change.
$bmsclientlist = $clientobj->getBMSClientList();
echo '<form name="changebmsid" method="post" action="' . $_SERVER['PHP_SELF'] . '"><select name="bmsid">';
foreach($bmsclientlist as $bmscli...
Can I use a script to check if a JS file is loaded?
I have a function, which places a form on a page with javascript controls. I don't know where the user will use this form, and it might be loaded several times into a page. It strikes me as the best way to handle things if the form itself loads the script, so it doesn't load if not n...
jQuery:
$("#contact-us-form").submit(function () {
var nameVal = $("input[name=name]").val();
var companyVal = $("input[name=company]").val();
var titleVal = $("input[name=title]").val();
var emailVal = $("input[name=email]").val();
var phoneVal = $("input[name=phone]").val();
var messageVal = $("input[name=messa...