Hi
Iam looking for a php parser that can do this.
{tag} Replace the tag with text comming from a function
{tag(params)} It must support params
{tag({tag(params)},{tag(params)})} It must support nesting
{tag()?
else
} It must support Tests
{$tag=value} It must support varriables
Do anyone of you know of an parser that can do thi...
Disclaimer, I'm not a PHP programmer, so you might find this question trivial. That's why I'm asking you!
I've got this kind of timestamp: 2010-05-10T22:00:00 (That's Y-m-d)
I would like to subtract, say, 10 days (or months, whatever) from this, and have my result be in the same format, i.e. 2010-04-30T22:00:00.
What function(s) do I ...
is it possible to return Facebook Application Description & Logo/Image just like we can return Application Name using
<fb:application-name />
...
I am trying to use the new facebook api and it requires libcurl PHP. I used
sudo apt-get install php5-curl
sudo apachectl -k restart
And it didn't work. I get the same error and the phpinfo() page says nothing about libcurl.
The source of this problem is probably that I built some of the tools from source (apache2, php), but the...
from my understanding, require pastes code into the calling php file.
what if you were requiring from inside a method...it would paste the entire code/class inside the method, blocking the next statement in the method.
eg.
function test() {
require 'pathtosomeclasscode';
somestatement; // any code after the require is block...
how do I define a constant inside a function
eg.
class {
public test;
function tester{
const test = "abc";
}
}
...
Online editing gettext files, is it possible?
I use gettext for all my PHP projects, but sides with a minor problem, want to mine user may translate my language from as Danish to Norwegian, but in this case it enste I know is that I need to export my file from Poedit there is any. other software that can export / import my files? for Po...
What is SimpleTest? What does assertTrue($b) do in SimpleTest? Do PHP programmers use SimpleTest often to test their programs?
...
I'm running PHP 5.1.6 with a 64-bit platform, 7.5 GB memory. I have the memory_limit set to 4 gigs.
I'm zipped a large amount of files (output size ~= 2gb), so I need this memory available.
When zipping the largest of my files, those that approach the 2gb limit I've imposed, the script fails with:
Integer overflow in memory_limit che...
Hi Everybody,
I have just installed Magento on Windows using WAMP.
Installation was successfull without any errors or warnings.
When i browse administration page, i can see login screen. After entering the correct credentials it is not displaying me the Dashboard/Control Panel. Its displaying the same login page.
If i enter wrong c...
I have a var dump of my sql query which return the following
I wanna to count in the array below that how many rows of myID = 5 are there. How would I do that. I am using php. Thanks in advance
array
0 =>
object(stdClass)[17]
public 'myID' => string '5' (length=1)
public 'data' => string '123' (length=3)
1 =>
...
How can i remove
<h1>and its contents</h1>
from the following line
strip_tags(substr($article->content(),0,255)
from this complete code
<?php $last_articles = $this->children(array('limit'=>5, 'order'=>'page.created_on DESC')); ?>
<?php foreach ($last_articles as $article): ?>
<div class="entry">
<h3><?php echo $article->link($a...
When i try run this file i am getting this error.
<?php
$im = imagecreatetruecolor(100, 100);
// sets background to red
$red = imagecolorallocate($im, 255, 0, 0);
imagefill($im, 0, 0, $red);
header('Content-type: image/png');
imagepng($im);
imagedestroy($im);
?>
Warning: Cannot modify header information - headers already sent by (ou...
I am getting this error :
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in wp-content/themes/phil/page.php on line 104
This is my code:
<?php
$todaysDate = date ('M d');
$event_query = new WP_Query('showposts=5&category_name=events&meta_key=Date&meta_compare=>=&meta_value='.$todaysDate.'&orderby=meta_value=order=ASC'...
I am working on a class in php that is basically an interface to a database row. I wanted to create a delete() method that would 1. delete the database row and 2. destroy the instance of itself so that further attempts to manipulate the row via the object would throw warnings.
Doing some googling, it seems that, in php5, it's not possi...
Hi guys,
I was wondering if i could assign values to a variable inside an IF statement. My code is as follows:
<?php
if ((count($newArray) = array("hello", "world")) == 0) {
// do something
}
?>
So basically i want assign the array to the $newArray variable, then count newArray and check to see if it is an empty arra...
Hi,
I’m currently trying to develop a method to get a overview of all my different web templates I’ve created and (legally) downloaded over the years. I thought about a displaying them like Wordpress is previewing it’s templates view a small preview windows, displaying the concrete file with styles and everything.
How to divide them in...
hello, i want to apply soap to post a form of customer details using php.could you please help me how do i start to do it..(the steps that i need to apply)thanks..
...
Hi guys,
I am parsing an XML file with PHP and inserting the rows in a MYSQL database.
I am using PHP simplexml_load_files to load the XML and a foreach to loop through the array and insert the rows into my database.
It works perfectly fine with small files i am testing, but it comes to reality I need to parse a large 500mb XML file a...
I'm writing an error logging service that will be integrated into websites running on my server, that will email me error batches, etc.
So I've been trying to find out if there's a way to handle fatal and parse errors, however not using the tricks to handle it in PHP code (output buffer, shutdown function). I'm quite happy to write some...