Explorar o código

Adding example illustrating how to set custom phantomjs executable path

Jonny Wenmoth %!s(int64=11) %!d(string=hai) anos
pai
achega
4a08348920
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      examples/custom-phantomjs-location.php

+ 8 - 0
examples/custom-phantomjs-location.php

@@ -0,0 +1,8 @@
+<?php
+
+require '../vendor/autoload.php';
+
+use JonnyW\PhantomJs\Client;
+
+$client = Client::getInstance();
+$client->setPhantomJs('/path/to/directory/that/contains/phantomjs/executable'); // Executable file in directory must be called 'phantomjs'