Posts

Showing posts from 2015

PHP - Remove illegal character in path and filename

Reference From: http://stackoverflow.com/questions/2021624/string-sanitizer-for-filename

C# - Remove illegal character in path and filename

C# - Access modifiers

public The type or member can be accessed by any other code in the same assembly or another assembly that references it. private The type or member can only be accessed by code in the same class or struct. protected The type or member can only be accessed by code in the same class or struct, or in a derived class. internal The type or member can be accessed by any code in the same assembly, but not from another assembly. protected internal The type or member can be accessed by any code in the same assembly, or by any derived class in another assembly. Reference From:  http://stackoverflow.com/questions/614818/what-is-the-difference-between-public-private-protected-and-nothing

PHP - Setting maximum file size to upload/post

JQuery - save sorting order to database

PHP - substr in Thai language

PHP 5.5.17 - Fatal error: Call to undefined function curl_init()

For PHP 5.5.17, if you have to config your php.ini manually and you found the problem "Fatal error: Call to undefined function curl_init()". Your solution is:  1. Open your php.ini (in you php folder ex. c:\php) 2. Find ";extension=php_curl.dll" 3. Remove ";"  and save 4. Restart your Apache Server But!!! If you run PHP 5.5.17 with Apache Server on Windows 7, the solution above may be not work. I found this solution from Bug #68047 the curl extension doesn't load using apache and the conclusion is you have to add "c:\php" into system's path and your problem is gone. 1. Go to My Computer -> Right click -> Properties 2. In left menu -> Choose -> Advanced system settings 3. Go to Advanced Tab -> Environment Variables -> System variables 4. Find "Path" Variable and add c:\php at the end