Skip to content

Commit 51a8048

Browse files
authored
Examples: require to require_once; PHP 5 to 7 (#38)
* Examples: require to require_once; PHP 5 to 7 Seems happy on PHP7, though we've implemented the class for PMG not PVE. Updated examples from require to require_once. * Resolve comments in #38 (CpuID/master)
1 parent 3f23afb commit 51a8048

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ API spec available at https://pve.proxmox.com/pve-docs/api-viewer/index.html
77

88
## Requirements: ##
99

10-
PHP 5 with cURL (including SSL) support.
10+
PHP 5/7 with cURL (including SSL/TLS) support.
1111

1212
## Usage: ##
1313

1414
Example - Return status array for each Proxmox Host in this cluster.
1515

16-
require("./pve2-api-php-client/pve2_api.class.php");
16+
require_once("./pve2-api-php-client/pve2_api.class.php");
1717

1818
# You can try/catch exception handle the constructor here if you want.
1919
$pve2 = new PVE2_API("hostname", "username", "realm", "password");
@@ -30,7 +30,7 @@ Example - Return status array for each Proxmox Host in this cluster.
3030

3131
Example - Create a new OpenVZ Container on the first host in the cluster.
3232

33-
require("./pve2-api-php-client/pve2_api.class.php");
33+
require_once("./pve2-api-php-client/pve2_api.class.php");
3434

3535
# You can try/catch exception handle the constructor here if you want.
3636
$pve2 = new PVE2_API("hostname", "username", "realm", "password");
@@ -66,7 +66,7 @@ Example - Create a new OpenVZ Container on the first host in the cluster.
6666

6767
Example - Modify DNS settings on an existing container on the first host.
6868

69-
require("./pve2-api-php-client/pve2_api.class.php");
69+
require_once("./pve2-api-php-client/pve2_api.class.php");
7070

7171
# You can try/catch exception handle the constructor here if you want.
7272
$pve2 = new PVE2_API("hostname", "username", "realm", "password");
@@ -92,7 +92,7 @@ Example - Modify DNS settings on an existing container on the first host.
9292

9393
Example - Delete an existing container.
9494

95-
require("./pve2-api-php-client/pve2_api.class.php");
95+
require_once("./pve2-api-php-client/pve2_api.class.php");
9696

9797
# You can try/catch exception handle the constructor here if you want.
9898
$pve2 = new PVE2_API("hostname", "username", "realm", "password");

0 commit comments

Comments
 (0)