Created
July 28, 2016 13:20
-
-
Save austintgriffith/1966c5ba9eda567fc72b3b955981a210 to your computer and use it in GitHub Desktop.
Php file to test the predis connection
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 | |
echo "Loading autoloader..."; | |
require '/var/www/vendor/autoload.php'; | |
echo "Registering predis..."; | |
Predis\Autoloader::register(); | |
echo "Creating client..."; | |
// Parameters passed using a named array: | |
$client = new Predis\Client([ | |
'scheme' => 'tcp', | |
'host' => '**DNS**', | |
'port' => **PORT**, | |
]); | |
echo "Setting value..."; | |
$value = $client->set('test','testie'); | |
echo "Getting value..."; | |
$value = $client->get('test'); | |
echo "done"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment