Hi,
I'm creating a library component for other developers on my team using PHP and Zend. This component needs to be able to take as input a date (string) and another string telling it the format of that date. Looking through the Zend documentation and examples, I thought I found the solution -
$dateObject = Zend_Date('13.04.2006', ar...
Hello, I am using MySQL and PHP. I am having a problem with inserting a new item at the end of my table. When I insert the new item appears after the last created item, but I want it to be entered at the bottom of the table.
Suppose that I have a table id=int,Primary Key and album=string and the table is:
Wrath
Crack The Skye
Enter Shi...
Creating an app to fill out some government forms using PHP (cakephp). The forms have about 4 layers for all the necessary parties to get a carbon copy. Which is why a dot matrix printer is being used.
Here's an example form:
Manifest Example: Designated Facility to Destination State (PDF) (1 pg, 93K)
Should I create a PDF based on th...
In terms of project scale, doctrine vs zend-db-table speed and performance, when should I use doctrine inside Zend project, and when zend-db-table?
...
Hi,
I want to use some kind of data structure in PHP (5.2), mainly in order to not pollute the global namespace. I think about two approaches, using an array or a class. Could you tell me which approach is better ?
Also, the main purpose would be for storing configurations constants.
Thanks
$SQL_PARAMETERS = array (
'server' => '...
Ive tried to use the Dom model with no bloody luck, getElementByID just doesnt work for me.
I loathe to resort to a regex but not sure what else to do.
The idea is to replace a <div id="content_div"> all sorts </div> with a new <div id="content_div"> NEW ALL SORTS HERE </div> and keep anything that was before or after it in the string....
Simple problem I have so far always solved via PHP:
You have a site with header, menu, footer and content field.
Header, menu and footer are usually the same for each page.
How do you, without PHP or any other server-side language, have the header, menu and footer data exist only in one file?
So that for example you don't have ten ...
The script I used fetched a file from
https://www.dropbox.com/browse_plain/$REMOTEDIR?no_js=true
which now returns:
HTTP/1.1 302 FOUND
Server: nginx/0.7.63
Date: Mon, 24 May 2010 17:02:44 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
location: /home
p...
I am a little new to this, but I need to convert the below XML to KML format so I can feed it into Google maps. Can anyone help with this?
<messageList>
<totalCount>1</totalCount>
−
<message>
<esn>0-7396996</esn>
<esnName>JOHN</esnName>
<messageType>TEST</messageType>
<messageDetail> ALL IS WELL AT CURRENT LOCATION.</messageDetail>
<tim...
I'm working with a few custom forms, and one of them isn't binding it's values on a POST. I'm using the same logic for each, and only one of them isn't working. Here's the code:
public function executeMediaFileUpload(sfWebRequest $request) {
$this->form = new MediaFileUploadForm();
if (!$request->isMethod('POST'))
...
I am getting Drupal messages stuck permanently in session, so that after being displayed they are not cleared. The unsetting code in function drupal_get_messages in bootstrap.inc is firing - It's as if the session is sleeping (i.e. serializing to disk) before the messages array is cleared.
Have you witnessed such a thing?
...
Hi,
Does anyone know how many questions you can get wrong in the Zend PHP Certification Exam without failing it? It doesn't say anywhere on the Zend site it just says you can either pass it or fail it(I figured as much myself).
...
Hey guys,
I'm trying to parse an xml file to return a item with a specific id only, but having trouble
making it work.
here's what I have in php
$xml_str = file_get_contents("test.xml");
$xml = simplexml_load_string($xml_str);
$albid = $_GET['id'];
$nodes = $xml->xpath('//library/book[@id=1]');
foreach($nodes as $node) {
echo $node[...
Now that ICann is allowing non-latin-character domain names, should I be concerned about e-mail validation? Currently, my sites are using php functions to ensure some alpha-numeric character set in each segment of an email address. Will these other character sets, such as Cyrillic, Arabic, and Chinese, pass validation? Are there recom...
I'm trying to load parse a Google Weather API response (chinese response). Here is the API call..
http://www.google.com/ig/api?weather=11791&hl=zh-CN
// This code fails with the following error
$xml = simplexml_load_file('http://www.google.com/ig/api?weather=11791&hl=zh-CN');
( ! ) Warning: simplexml_load_string()
[funct...
I have a PHP script that caches a remote XML file. I want to XSL transform it before caching, but don't know how to do this:
<?php
// Set this to your link Id
$linkId = "0oiy8Plr697u3puyJy9VTUWfPrCEvEgJR";
// Set this to a directory that has write permissions
// for this script
$cacheDir = "temp/";
$cachetime = 1...
I have a folder, and for all php files in that folder (or even better, in that folder or any folders within it) I'd like to make some changes to the php settings. Can I just place a php.ini file in that folder with those settings I'd like to change?
If so, any reason why this wouldn't be working for me? It's my own server.
Thanks!
edi...
I got this from a Soap client request:
Exception: SoapFault exception:
[soap:Client] Server was unable to
read request. ---> There is an error
in XML document (2, 273). ---> The
string '2010-5-24' is not a valid
AllXsd value. in /path/filinet.php:21
Stack trace: #0 [internal function]:
SoapClient->__call('SubIdDetailsBy...
Ok, that sounds really confusing. What I’m trying to do is this. I’ve got a function that uploads/resizes photos to the server. It stores the paths in the DB. I need to attach the id of the business to the row of photos.
Here’s what I have so far:
function get_bus_id() {
$userid = $this->tank_auth->get_user_id();
$this->db->sel...
hey guys, this might be really stupid, but hopefully someone can help. I'm trying to post to an external script using ajax so i can mail the data, but for some reason my data is not making it to the script.
$(document).ready(function() {
$("#submitContactForm").click(function () {
$('#loading').append('<img src="http://www.xxxxxxxx....