By stefano, on June 21st, 2011% I’ve to admit that I’ve found a big mistake in my programming when handling utf8 data in PHP. I’ve always included this header:
header("Content-type: text/html; charset=UTF-8");
With this header being sent the browser selects utf8 character set and everything works, the browser receive utf8 encoded text and displays it correctly, it sends back utf8 from . . . → Read More: Using utf8 the right way in PHP & Java
By stefano, on May 3rd, 2011% PHP has several places where configuration can be set. While I had an idea of the precedence of those settings, I decided to test them experimentally to be sure of what I am going to say. In particular this post is focused on error_reporting, but the same considerations can hold true for any setting.
So . . . → Read More: PHP Configuration, php.ini and overrides
By stefano, on August 21st, 2010% Unit testing is useful to test individual parts of the program, to check if they respect the specifications. Actually as any type of testing, can only point out bugs, but can’t prove that the program is correct.
Despite that, they are very useful during development, as TDD (Test Driven Development) suggests, it can be . . . → Read More: PHPUnit, Unit Testing with PHP
By stefano, on July 6th, 2010% When using php setlocale() function it’s important to check the return value. I used to call it without checking it as in:
setlocale(LC_ALL, ‘it_IT.UTF-8′);
Without figuring out that if the locale it_IT.UTF-8 is not present in the system, the setlocale function fails and returns false.
The first idea I had to try to add the . . . → Read More: Configuring locales on Ubuntu
By stefano, on January 26th, 2009% Today I try to enable debugging of PHP with Netbeans on the windows platform. For this reason I’ve downloaded the thread safe version of xdebug and placed it in my extension directory, in my case C:\easyphp3\php\ext
As explained in “Introducing xdebug” to activate it I added the following in my php.ini
zend_extension_ts=${path}\php\ext\php_xdebug-2.0.4-5.2.8.dll xdebug.remote_enable=1
After restarting . . . → Read More: Debugging PHP code with Netbeans
By stefano, on April 26th, 2007% Excerpt from http://www.vim.org/tips/tip.php?tip_id=12
To insert space characters whenever the tab key is pressed, set the ‘expandtab’ option:
set expandtab
With this option set, if you want to enter a real tab character use Ctrl-V<Tab> key sequence.
To control the number of space characters that will be inserted when the tab key is pressed, set the . . . → Read More: VIM: Converting tabs to spaces
By stefano, on March 21st, 2007% PHP / Java Bridge is an interesting technology to allow to connect PHP with a Java virtual machine. On the official site they claim “It is more than 50 times faster than local RPC via SOAP, requires less resources on the web-server side, and it is faster and more reliable than communication via the Java . . . → Read More: Configuring Apache / PHP with JavaBridge to Tomcat 5.5
By stefano, on May 26th, 2006% After having installed PHP5 SOAP support it’s time to try it… I’ve read the article PHP SOAP Extension from Zend.
Calling a method using WSDL is really easy:
<?php $client = new SoapClient("http//services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl"); print($client->getQuote("ibm")); ?>
But my aim is to build a small SOAP server. The first step is to create the WSDL and a . . . → Read More: Working with SOAP in PHP
|
|
Recent Comments