I'm using php DOM to build an XML file of data, it works fine but it all outputs on one line, like so:
<property><something><somethingelse>dfs</somethingelse></something></property>
However in all examples I've found it's outputting properly, like so:
<property>
<something>
<somethingelse>
dfs
</something...
I'm testing the php exec command:
http://php.net/exec
and I'm getting back a result code of 127.
My php code is:
<?
print "<br>executing 'hello':<br><b>";
exec ("hello", $output, $result);
var_dump($output);
print "<br>$result";
print "<br></b>end hello.";
print "<br><hr><br>";
print "<br>executing 'dir':<br><b>";
exec("dir", $o...
I am trying to figure out how to create a function where I can pass in two strings, one with wildcards and another that is checked to see if it matches the wildcard string.
$wildcard_string = '*.example.com/some/path/*';
$test_string = 'dev.example.com/some/path/art123.html';
function test_wildcard_match($wildcard_string, $test_string...
How do I use Unicode with PHP?
I want to store Unicode value in a PHP variable but it output some question marks.
What is the solution?
...
I'm building a system that watches a queue and activates a set of tasks on a regular interval.
I'm interested in running multiple instances of my processing "bots" based on how many items are in the queue. So if there are 5 items I'll run two bots and if their are 10 I'll run four.
I know how to run multiple instances from CLI (manuall...
I was wondering if anyone knows a way to know when fsockopen times out?
For instance if I set the timeout to 5 seconds, can I define a handler to do something if it hits that timeout connecting to my server?
thanks
...
Ello,
I am struggling with some date troubles here in PHP/MySql. I have a form that offers the recurrence of a payment yearly,quarterly,monthly,bi-weekly,or weekly and I need to be able to track when payments are made.
So for example, if something is added on Monday March 8th (that's the date it is being entered), recurring Weekly on T...
The problem is how to do it efficiently when checking whether the cache has expired?
Can you explain with some really basic demo?
...
i have developed a php based app for facebook. now i need to push data into the user's stream.
for that I have to implement the xd_receiver.html cross domain communication channel.
now the problem i am facing is i have done exactly as mentioned in the documentation, but in the console log, I am getting Error Code 102
It says:
API fail...
So let's say the HTML looks something like this:
<select name="some_name">
<option value="1">1</option>
<option value="2">2</option>
<option value="3" selected="selected">3</option>
<option value="4">4</option>
</select>
I need to extract the option tag with attribute selected="selected" from there. How can I do that? ...
below is a php code that is used to add variables to a session.
<?php
session_start();
if(isset($_GET['name'])) {
$name = isset($_SESSION['name']) ? $_SESSION['name'] : array();
$name[] = $_GET['name'];
$_SESSION['name'] = $name;
}
if (isset($_POST['remove'])) {
unset($_SESSION['name']);
}
...
I cant open .doc files from my browser on my website (php)
rather my 404 page, opens
could it be my htaccess setings?
...
This query has baffled me... I've searched the web work over a day now and I have tried numerous things.
I want to get the avg number of orders for every day of the week from my db. I can pull the total # with COUNT just fine. But I just can't figure out how to get the AVG of COUNT on a GROUP BY. I've tried subqueries... functions... ev...
I've been working with PHP for about a year, but I do it as a hobby. I dont have anybody I can go to as a teacher or a mentor to give me advice on what I may be doing completely wrong, or what I could do better. I've done quite a few different things within that year, so I wouldnt consider myself a complete noob.
Anyways, I have just st...
Hey, I'm trying to add a button that when clicked will grab data from the mysql database and display it with a pagination. However, I can't seem to get it to work properly.
The first main page looks like this:
pagination.php:
<?php
include('config.php');
$per_page = 3;
//Calculating no of pages
$sql = "select * from explore";
$result ...
I'm trying to install this ORM library,
but I see it requires PEAR Installer and Pear Package,where are they used?
...
I am trying to cache an array with Zend_Cache like this:
$cache = Zend_Registry::get('cache');
// $data is an array
$cache->save($data, 'externalData');
And I am getting this error:
Message: Datas must be string or set automatic_serialization = true
Even though the automatic_serialization is set tu true when initializing Zend_Cache...
Hi, my application updated some of the framework as well as jquery and now doesn't work. I'm not sure what to do since I'm not getting useful information back to debug. Here's what I am looking for:
GIVEN: I am on the selected page with a text field and submit button
WHEN: I type a few letters in the textbox
THEN: I want Autocomple...
I'm trying to implement a starring system akin gmail, being able to mark an item important by clicking on a graphic.
if($starred == 1){
$starred = '<img class="starred" id="row_'.$trouble_ticket_id.'" src="images/icons/silk/award_star_gold_3.png" alt="Star">';
}
else{
$starred = '<img class="unstarred" id="row_'....
I am working on a project named Rosepad which is my vision of an Issue Tracking system. I know many people may call it "yet another foo", but it fulfills the void which I had witnessed.
Now getting to the point, I am using CodeIgniter framework to build this web application. The framework itself is released under a permissive-style lice...