September 2011
29 Ogos 2011, 7:29 am
Isnin, 29 Ogos 2011, 7:29 am0 WordPress data validation has some good reference in doing data validation, especially the philosophy part. For best practice, always use format correction first, then use whitelist. However the above example is only for one input ($_GET[‘action’]). What if your web app (or controller) need a few inputs, and surely […]
27 Ogos 2011, 6:20 am
Sabtu, 27 Ogos 2011, 6:20 am0 This setup is using Apache 2.2 bundled with XAMPP, in Windows 7 Create new config file: /xampp/apache/conf/extra/httpd-cache-proxy.conf LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule proxy_connect_module modules/mod_proxy_connect.so LoadModule proxy_ftp_module modules/mod_proxy_ftp.so Listen 3128 NameVirtualHost *:3128 <VirtualHost *:3128> ErrorLog "logs/proxy-error.log" CustomLog "logs/proxy-access.log" combined <IfModule mod_proxy.c> ProxyRequests On ProxyVia On <Proxy *> Order […]
26 Ogos 2011, 8:23 am
Jumaat, 26 Ogos 2011, 8:23 am0 However, as the web application grow, the controller part may become very complex. As we know, a web page is a collection of sections which combined together to become a page – header, sidebar, main content, footer, banner etc. are sections (or whatever you call it). Therefore, it would […]
26 Ogos 2011, 8:20 am
Jumaat, 26 Ogos 2011, 8:20 am0 Having read http://www.phpwact.org/pattern/centralized_request_logic, one thought comes to mind, which one the better preferred way to code the page controller for PHP. The page controller is the common pattern, where a file handles one web page and all of its actions. Files are being accessed directly. Base class usually being used […]
24 Ogos 2011, 9:33 pm
Rabu, 24 Ogos 2011, 9:33 pm0 Probably you have tried easy_install MySQL-python on Windows but you stuck with this error: Running MySQL-python-1.2.3setup.py -q bdist_egg --dist-dir c:usersusernameappda talocaltempeasy_install-diltq4MySQL-python-1.2.3egg-dist-tmp-nltxld error: The system cannot find the file specified Solution, get the installer: http://www.codegood.com/archives/4 Ogos 2011ShareTweetSaveSendCopy
22 Ogos 2011, 12:50 am
Isnin, 22 Ogos 2011, 12:50 am0 I’ve been developing website using PHP for quite a while now, and one thing come across my mind. The company I’m working with is using basic query function using PHP PDO: $db->prepare('query...'); $db->execute(); $db->fetchAll(); (Well, not actual code, just to show we’re using PHP PDO). We are using our […]