GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — contentstack-php/examples/index.php at development · contentstack/contentstack-php Expand file tree/ Copy pathindex.phpMore file actions executable file ·35 lines (32 loc) · 1.55 KB / Copy pathindex.phpFile metadata and controlsexecutable file ·35 lines (32 loc) · 1.55 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 <html> <head> <title>Contentstack PHP SDK</title> </head> <body> <h1>Welcome to Contentstack PHP SDK</h1> </body> </html> <?php ini_set('display_errors', 'Off'); require_once __DIR__ . '/../src/contentstack.php'; use Contentstack\Contentstack; use Contentstack\Support\Utility; $stack = Contentstack::Stack('', '', ''); try { // \Contentstack\Utility\debug($stack); // $result = $stack->getContentTypes('{"include_snippet_schema": "false"}'); // $result = $stack->ContentType('first_ct')->Query()->toJSON()->find(); // $result = $stack->ContentType('a')->Fetch(); // $result = $stack->ContentType('a')->Query()->includeSchema()->toJSON()->find(); // $result = $stack->ContentType('ctwithallfields')->Query()->addParam('include_dimensions', true)->toJSON()->find(); // $result = $stack->ContentType('a')->Entry('blta07130f8b344b260')->includeContentType()->toJSON()->fetch(); $result = $stack->Assets()->Query()->includeFallback()->toJSON()->find(); //$result = $stack->Assets('blt9b5825dd804a9067')->addParam('include_dimension', 'true')->fetch(); Utility::debug(($result)); } catch(Exception $e) { // Log the details server-side; never echo them to the client. error_log("Message : ".$e->getMessage()); // returns message -> API -> error_message error_log("Code : ".$e->getCode()); // returns number -> API -> error_code error_log("Errors : ".print_r($e->getErrors(), true)); // returns array -> API -> errors echo "The request failed. See the server log for details."; } |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |