I have a laptop and a desktop, for which I'm trying to learn to use git to manage my work against a perforce repository. I'm using git-p4 successfully on the desktop, and can use it successfully on the laptop as well, in isolation. However, one of the things I'd like to be able to do is to "pull" or "push" changes from the laptop to de...
Scenario:
$x = json_decode( $x );
foreach ( $x as $item )
{
$info[] = $item; //ERROR
}
I am looping though a datafeed to get the data. I want to add items to a stdClass object in a loop. How would I do that? I'm not that familiar with stdobj's.
...
I have a table called scheduler_sched which has several columns, including a column called schedule_id.
I need a function where I can pass 2 ids (copy_from_id, copy_to_id) as parameters. And what I need to do is take every row where schedule_id = copy_from_id AND duplicate it but change the copy_from_id to the copy_to_id
So basically ...
I am trying to get an array of a date plus the next 13 dates to get a 14 day schedule starting from a given date.
here is my function:
$time = strtotime($s_row['schedule_start_date']); // 20091030
$day = 60*60*24;
for($i = 0; $i<14; $i++)
{
$the_time = $time+($day*$i);
$date = date('Y-m-d',$the_time);
array_push($dates,$dat...
Hi friends,
serious problem with an angry client :(
i have an issue about "Cannot redeclare variable" etc. i had a website working on PHP4 then moved to PHP5 and i have this error:
Fatal error: Cannot redeclare CSQLAdmin::$functions in /blabla/lib/sqladmin.php on line 45
I tried to clear the second declaration at the file, and it fi...
I am trying to develop a program for fetching email from the inbox of gmail. Can you help me for doing... If the code can automatically fetch the email, it is very good.. I am preferring
php code.....
...
For a number of reasons (all of which can, basically, be broken down to bad management decisions) we're unable to switch to PHP5, meaning we'll have to support PHP4 for probably a few more years.
Since a lot of our applications (as with a lot of web apps) are glorified CRUD apps, and because I like to pick up the occasional home project...
I know that PHP4 is "dead", however there are about two dozen or so of our clients that still are located on servers where PHP4 is used, and we won't get any server upgrades until around a year or two.
I'm just about to start working on refactoring and improving our core web framework, which is now coded for the lowest common denominato...
Is there an official date for when support for PHP4 will end?
I keep reading this date and that on various sites and blogs, but can't find anything on the PHP website. Am I overlooking something?
...
Im using this function simplexml_load_string() in my file which is doing search lucene based.
But its not working in php4.
please suggest me a function similar to this one so that i dont have to change my coding much.
this is the sample of my code :-
function handleResponse($data)
{
if ($data)
{
$xml = simplexml_...
Hi there I have the following XML code:
<?xml version="1.0" encoding="UTF-8"?>
<connector_ret>
<function name="search">
<row id="1">
<col id="1">AAA</col>
<col id="2">243168</col>
<col id="3">090828-000300</col>
<col id="4">Subject</col>
</row>
<row id="2">
<col id="1">BBB</...
I have a file called generator.php that uses fwrite() to create a result.php on the server (Apache, PHP4).
One of the lines in result.php is a PHP include() statement.
So, in generator.php:
if (!is_file($fname)){
$resultfile = fopen($current_path . "/" . $fname, "w+");
}
fwrite($resultfile, '<?php include($_SERVER["DOCUMENT_ROOT"]...
To clarify:
no I can't make this pure PHP5
yes this code works in PHP 4.3.9.
I don't have any real world experience implementing or supporting PHP4 but I had to recently change my class so it supports both PHP4 and PHP5.
Can anyone foresee any possible issues in regards to my implementation of the singleton method used here? I onl...
Has anyone been able to get the CometChat application working locally? Our application is written in .NET 3.5 (C#) and we're going to use CometChat as our chat solution (it's pretty slick!). However, I'm trying to get it set up locally to test before pushing it to our test environment, but I'm running into misc issues (namely SERVER vari...
Hello All,
How do i detect of a certain class has constructor method in it? eg:
function __construct()
{
}
...
Hello All,
PHP allows you to replace or even re-name PHP's built-in functions using functions such as
override_function and rename_function.
Can we override the PHP's language constructs like the ones below?
echo
eval
...etc
...
Hello There,
How to get compatible with php4 in a framework developed with php5?
Thanks
...
Hello All,
A number of people are unhappy with
the current implementation where there
are either too many different string
types (binary, string, unicode) or the
multiple implementations of many
internal engine functions and helper
functions.
Minutes PHP6 Developer Meeting
This is for the PHP gurus.
Do we really nee...
Hello,
Is there any particular difference between intval and (int)?
Example:
$product_id = intval($_GET['pid']);
$product_id = (int) $_GET['pid'];
Is there any particular difference between above two lines of code?
...
I'm trying to convert a plugin I wrote procedurally to be class based, and it's not working for some unknown reason. So I wrote cut down my plugin code to be about as minimilistic as possible. When it runs, it comes back with no content.
<?PHP
/**
* Plugin Name: A1 Test
* Version: 1.0.0
* Plugin URI:
* Descripti...