
PHP
文章平均质量分 59
magic_dreamer
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Symfony(1)Installation and Tour
Symfony(1)Installation and Tour1. Install symfoyCheck the PHP version on my machine>php --versionPHP 5.4.24 (cli) (built: Jan 19 2014 21:32:15) Copyright (c) 1997-2013 The PHP Group Zend Engine v...原创 2014-06-05 07:02:19 · 207 阅读 · 0 评论 -
PHP(8)RESTful - Model Route Controller - Simple Example
PHP(8)RESTful - Model Route Controller - Simple Example All the sample and details are in project easyphprest project. 1. Model I am using the default things, so I directly create a Class named...原创 2015-09-01 01:01:13 · 360 阅读 · 0 评论 -
Build Blog with WordPress(1)First Simple Installation
Build Blog with WordPress(1)First Simple Installation 1. Install Apache install apache on raspberry > sudo apt-get install apache2 Command to start > sudo service apache2 start Error Messa...原创 2015-09-01 03:20:06 · 137 阅读 · 0 评论 -
PHP and Cron
PHP and Cron Usually, it makes sense to run the cron job in crontab and trigger a PHP script command. But I have a single IOCUtil object and a lot of related codes there. So on top of a cron par...原创 2016-08-19 02:23:50 · 202 阅读 · 0 评论 -
Batch Insert in PHP MySQLi
Batch Insert in PHP MySQLi When I was using oracle database long time ago, I know batch insert is much faster if we do know the data we want to insert. Recently I was using PHP 5.6 and MySQL. I fou...原创 2016-08-24 00:58:26 · 217 阅读 · 0 评论 -
Symfony(8)Update Version to 2.5
Symfony(8)Update Version to 2.51. Installation Latest PHPhttp://us1.php.net/distributions/php-5.6.2.tar.gzDownload the unzip the file>tar zxvf php-5.6.2.tar.gzpreinstall and config the files>./...原创 2014-10-30 06:17:32 · 111 阅读 · 0 评论 -
PHP Call Wget Command
PHP Call Wget Command In my PHP code, I am using system command to download files as follow: $wgetCmd = "wget --no-check-certificate -nv -O " . $this->storageLocal . "{$outputFileName}-downloading...原创 2017-03-24 23:35:20 · 202 阅读 · 0 评论 -
PHPRedis Library
PHPRedis Library We can install the PHP extension, we will build and generate a redis.so file and place it in PHP configuration. >phpize it requires php-devel or php56-devel >./configure [—e...原创 2017-03-30 00:32:16 · 105 阅读 · 0 评论 -
PHP Connect Redis Driver
PHP Connect Redis Driver I was using Predis before. But it seems that our company is using another one in the common codes. So I plan to follow that and use that one instead. https://github.com/...原创 2016-11-23 00:29:12 · 106 阅读 · 0 评论 -
PHP ENV and HTTP Extension
PHP ENV and HTTP Extension We keep having issues with http.so and iconv.so and others. So at first, we try to fix that in this way. The Dockerfile is as following: #Prepre the OS FROM ...原创 2017-01-12 01:04:06 · 189 阅读 · 0 评论 -
PHP HTTP Library and Error Handling
PHP HTTP Library and Error Handling Recently, I was using PHP code to do some HTTP protocol request. I have the Try Catch code there. But it seems it is not working well. I finally find a soluti...原创 2017-02-11 06:19:28 · 222 阅读 · 0 评论 -
PHP Redis Client and Replica
PHP Redis Client and Replica We can configure the replica connection client like this: $timeout_parameters = "&timeout=10&read_write_timeout=10"; $parameters = array( 'tcp://' . $redisHos...原创 2017-02-16 01:11:52 · 137 阅读 · 0 评论 -
PHP Redis Client and Cluster
PHP Redis Client and Cluster Set up the Redis Cluster try { $this->clientCluster = new Client($redisHostCluster, array('cluster' => 'redis')); $logger->debug("Successfully set up Redis...原创 2017-02-16 03:34:52 · 114 阅读 · 0 评论 -
JSON Log in PHP and Cloud Watch(1)JSON Format in PHP
JSON Log in PHP and Cloud Watch(1)JSON Format in PHP One way to powerful the search in CloudWatch Log is to use Pure JSON in log. First Step Configure JSON Format Log in PHP I am using this lo...原创 2017-12-30 05:31:50 · 206 阅读 · 0 评论 -
PHP XML Writer
PHP XML Writer PHP XML writer memory sample Execute the command, we can see the performance > php xmlwriter-uri.php References: http://codeinthehole.com/writing/creating-large-xml-files-w...原创 2017-03-10 03:59:33 · 201 阅读 · 0 评论 -
PHP(7)RESTful Framework - Lumen - Settings and Env
PHP(7)RESTful Framework - Lumen - Settings and Env 1. Install lumen Install composer http://coderexample.com/composer-easy-tutorial/ composer will downloading dependency library automatically,...原创 2015-08-29 04:19:45 · 152 阅读 · 0 评论 -
PHP and Http Extension
PHP and Http Extension Recently I am testing the performance for PHP. I just saw a very ‘easy’ exceptions say http\Url class not found. I was thinking it is easy to fix this and it is just a typo o...原创 2016-07-22 11:44:35 · 118 阅读 · 0 评论 -
PHP Backend Application(6)Retry Function, PHPUNIT ENV and Async Redis and Large
PHP Backend Application(6)Retry Function, PHPUNIT ENV and Async Redis and Large File 1 Retry Functions in PHP /** * post json params to prediction * @param string $path * @param array $params, ...原创 2016-07-01 05:11:24 · 146 阅读 · 0 评论 -
Symfony(2)Tour - Views Controllers Bundles
Symfony(2)Tour - Views Controllers Bundles1. Twig Twig Twighttp://twig.sensiolabs.org/documentationA Twig template is a text file that can generate any type of content (HTML, CSS, JavaScript, XML, CSV...原创 2014-06-05 23:15:36 · 138 阅读 · 0 评论 -
Symfony(3)Environment Update and Configure
Symfony(3)Environment Update and Configure1. PHP EnhancementWhen I try to run the Command >composer installLoading composer repositories with package informationI get this Error Messageguzzle/guz...原创 2014-06-11 00:25:47 · 261 阅读 · 0 评论 -
Symfony(4)Pages in Symfony2
Symfony(4)Pages in Symfony2There is a simple two-step process.Create a RouteCreate a Controller1. Environment and Front ControllersThere are 3 environment defined — dev, test and prod.Symfony2 comes w...原创 2014-06-12 00:24:00 · 109 阅读 · 0 评论 -
Symfony(5)Controller
Symfony(5)ControllerThe goal of a controller is always the same: create and return a Response object. Along the way, it might read information from the request, load a database resource, send an email...原创 2014-06-12 01:27:49 · 390 阅读 · 0 评论 -
Symfony(6)Service Container
Symfony(6)Service ContainerA modern PHP application is full of objects. A service container will allow us to standardize and centralize the way objects are constructed in our application.1. BasicWhat ...原创 2014-06-12 03:37:45 · 244 阅读 · 0 评论 -
PHP(6)PHP with fpm and NGINX
PHP(6)PHP with fpm and NGINX 1. Set Up latest PHP with Nginx If get some problem with libtool to build some library. We should use /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefau...原创 2015-07-02 03:42:23 · 137 阅读 · 0 评论 -
PHP(4)Types - Variables
PHP(4)Types - Variables 1. Types Previous Types, Booleans, Integers, Floating point numbers, Strings, Arrays 1.1. Objects $bar = new Foo; new to create the object based from class $bar->do_...原创 2016-06-01 00:19:42 · 131 阅读 · 0 评论 -
Install PHP 5.6 on EC2
Install PHP 5.6 on EC2 Start with this version > wget http://ar2.php.net/distributions/php-5.6.16.tar.bz2 Unzip the file > tar -xvf php-5.6.16.tar.bz2 Configure that > ./configure --prefix...原创 2016-06-01 00:32:19 · 117 阅读 · 0 评论 -
PHPUnit and PHP
PHPUnit and PHP 1 Check the version of my PHP > php --version PHP 5.5.30 (cli) (built: Oct 23 2015 17:21:45) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2015 Ze...原创 2016-06-01 00:35:15 · 175 阅读 · 0 评论 -
PHP Backend Application(1)Env and PHP Knowledge
PHP Backend Application(1)Env and PHP Knowledge Check the PHP version > php --version PHP 5.6.16 (cli) (built: Dec 26 2015 18:37:18) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Co...原创 2016-06-03 00:12:36 · 210 阅读 · 0 评论 -
PHP Backend Application(2)Logging Config IOC and Unit Test
PHP Backend Application(2)Logging Config IOC and Unit Test 1 Configuration and Unit Test I create file like config-stage.ini or config-local.ini. The base class ConfigUtil.php will handle the c...原创 2016-06-03 01:07:45 · 104 阅读 · 0 评论 -
PHP Backend Application(4)Mysql Advanced and Eclipse with PHPUnit
PHP Backend Application(4)Mysql Advanced and Eclipse with PHPUnit 1 MySQL Advanced Operation FIND_IN_SET is not using index, it is said. public function getStateIDsByZipCodes($zipCodes) ...原创 2016-06-09 22:24:05 · 116 阅读 · 0 评论 -
PHP Backend Application(5)Redis Advanced and PHP Memory and HTTP Client
PHP Backend Application(5)Redis Advanced and PHP Memory and HTTP Client 1 Trouble Shooting PHP Memory and TimeZone Issue Error Message: 1) SegmentServiceTest::testGetCampaignConfig date(): It is...原创 2016-06-21 23:22:04 · 225 阅读 · 0 评论 -
Laravel PHP Framework(1)Introduction and Installation
Laravel PHP Framework(1)Introduction and Installation Check PHP is on my Local Machine > php --version PHP 7.1.16 (cli) (built: Mar 31 2018 02:59:59) ( NTS ) Copyright (c) 1997-2018 The PHP Gr...原创 2018-08-22 02:47:53 · 323 阅读 · 0 评论