Problem: When try to store Chinese to mysql database, ??? was stored.
Solution:
– set names utf8;
– set character set utf8;
– set database field’s Collation to be “utf8_general_ci”
Problem: When try to store Chinese to mysql database, ??? was stored.
Solution:
– set names utf8;
– set character set utf8;
– set database field’s Collation to be “utf8_general_ci”
PHP and SQL Server are a powerful combination, however sometimes data stored in a text type column is truncated for no apparent reason after 4096 characters.
I got this problem today when I want to display text data from SQL Server 2000. Apparently, I need to increase the maximum size of a text column to be returned from SQL Server by PHP. Since I have control over the Web Server. Here is how I fixed the problem.
To be a professional PHP developer, framework probably is a final solution. Since ZF is Zend’s product, I think it would not be a bad idea if I learn it even I’m not sure which framework is better. Anyway, the best learning approach is to start studying right now. Here is my first practice example.
The following is the PHP code for uploading files using Alfresco Web Service. I put some comments inside the code. If there is anything confuses you, please leave your comment and I hope I can help. if (isset($_SERVER["ALF_AVAILABLE"]) == false) { require_once "./alfresco_sdk/remote/Alfresco/Service/Repository.php"; require_once "./alfresco_sdk/remote/Alfresco/Service/Session.php"; require_once "./alfresco_sdk/remote/Alfresco/Service/SpacesStore.php"; require_once "./alfresco_sdk/remote/Alfresco/Service/ContentData.php"; } $repositoryUrl = "http://localhost:8080/alfresco/api"; $userName = … Read more