This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Install the MYSQL driver | |
# gem install mysql2 | |
# | |
# Ensure the MySQL gem is defined in your Gemfile | |
# gem 'mysql2' | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
development: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
listen 443 ssl http2; | |
server_name .phpsandbox.test; | |
root "/home/vagrant/code/public"; | |
index index.html index.htm index.php; | |
charset utf-8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use React\ChildProcess\Process; | |
use React\EventLoop\Factory; | |
use function React\Promise\Stream\buffer; | |
require "vendor/autoload.php"; | |
$proc = new Process("composer"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// doctor_registration.php | |
Session::init(); | |
$this->view->data['username'] = Session::get('username') ? Session::get('username') : ''; | |
$this->view->data['first_name'] = Session::get('first_name') ? Session::get('first_name') : ''; | |
$this->view->data['last_name'] = Session::get('last_name') ? Session::get('last_name') : ''; | |
$this->view->data['email'] = Session::get('email') ? Session::get('email') : ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$curl = curl_init(); | |
curl_setopt_array($curl, Array( | |
CURLOPT_URL => 'http://blogs.guggenheim.org/map/feed/', | |
CURLOPT_USERAGENT => 'spider', | |
CURLOPT_TIMEOUT => 120, | |
CURLOPT_CONNECTTIMEOUT => 30, | |
CURLOPT_RETURNTRANSFER => TRUE, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ redis-cli | |
> config set stop-writes-on-bgsave-error no |
In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"price": 21975, | |
"customization": { | |
"id": 5, | |
"name": "Cooo", | |
"features": [ | |
{ | |
"id": 36, | |
"name": "Colar", | |
"unit": "dB", |
- Tools Build on React PHP: https://github.com/reactphp/reactphp/wiki/Users
- Laravel Swoole
- Swoft Framework (Built on Swoole)
- Async Articles
NewerOlder