PHP

PHP

PHP

Add New Drupal Module / Theme in 10 minutes using Zend Studio for Eclipse

This guide will describe how to add a new theme or module using Zend Studio for Eclipse


To create a new CVS repository connection:

1. Open the CVS perspective by going to Window menu and selecting Open Perspective >> Other >> CVS Repository Exploring.

2. Click the Add CVS Repository button on the view's toolbar -or- right-click within the CVS view and select New >> Repository Location.
The Add CVS Repository dialog will open.

add_cvs

3. Enter the information required to identify and connect to the repository location:

Tags

Merging stdClass() objects in php


<?php
 
$foo1 = new stdClass();
$foo2 = new stdClass();
$foo3 = new stdClass();
 
$foo1->one = "1";
$foo2->two = "2";
 
foreach ( $foo1 as $key => $value ) {
  $foo3->$key = $value;
}
 
foreach ( $foo2 as $key => $value ) {
  $foo3->$key = $value;
}
 
var_dump($foo3);

Tags

using NuSoap: consume a .NET web service in 10 min

The WSDL file

This is the URL for a WSDL file that hosted at a IIS server. http://www.webservicex.com/TranslateService.asmx?wsdl

So let's try to compose by our-self the content of the body of our SOAP message to query this web service, we will use NuSoap to achieve the job: we must use the targetnamespace this way, this .NET web service doesn't like the namespace prefix generated automatically by NuSoap
wsdl:definitions targetNamespace="http://www.webservicex.net"
nothing really difficult here, just follow the wsdl, or, use the tool TcpTunnelGui with a working client, or see the documentation generated by the .NET web service on-line

Tags

30 Useful PHP Classes and Components

Simplicity and extensibility are the main reasons why PHP became the favourite dynamic language of the Web. In the last decade, PHP has developed from a niche language for adding dynamic functionality to small websites to a powerful tool making strong inroads into large-scale Web systems.

Below I present 30 useful PHP classes and components that you can use to test, develop, debug and deploy your PHP applications. Let me know if I missed anything or if you have something to add.

Tags

Create a PHP webservice in 5min, Using PHP, SOAP and WSDL Technology , NuSOAP

Introduction

Unless you have been living in a cave somewhere without Internet access for the last few years, you have undoubtedly heard of XML, SOAP and Multi-Tiered Application Programming. If you are like many programmers, including myself, you were quite taken aback by these ideas and technologies. You may have gone so far as to simply dismiss them as irrelevant to your skill set. It's time to wake up and realize they're hereto stay... and for good reason!.

Tags

failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request

Error: copy(http://4.bp.blogspot.com/_YJxWEghlXts/SL6FjtRxdyI/AAAAAAAAAk8/TBCnJNEWgW... 25.jpg) [function.copy]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad RequestFixes :

Tags

Announcing O'Reilly Drupal book: Using Drupal

Team Lullabot is really excited to unveil O'Reilly Media's first Drupal book, Using Drupal, due out next month. (BTW, that's a dormouse on the cover. :)) The book is written against Drupal 6.

Tags

PHP recursive directory remove function

<?phpfunction RemoveDir($sDir) {if (is_dir($sDir)) {$sDir = rtrim($sDir, '/');$oDir = dir($sDir);while (($sFile = $oDir->read()) !== false) {if ($sFile != '.' && $sFile != '..') {(!is_link("$sDir/$sFile") && is_dir("$sDir/$sFile")) ? RemoveDir("$sDir/$sFile") : unlink("$sDir/$sFile");}}$oDir->close();rmdir($sDir);return true;}return false; }

Tags

How to create and remove directory / folder in PHP

Remove directory$mydir = '/path/directory/images/'; // this will remove images directoryif (is_dir($mydir)) {rmdir($mydir);} else {echo $mydir.' does not exists';}Create$mydir = '/path/directory/images/

Tags