Welcome Guest, Not a member yet? Register   Sign In
to use / or to use \ ?
#1

I have this code
PHP Code:
require 'vendor/autoload.php';
use 
Aws/DynamoDb/Exception/DynamoDbException;
use 
Aws/DynamoDb/Marshaler;
require 
'vendor/aws.phar';
//use AwsDynamoDbDynamoDbClient;
use GuzzleHttp/Stream/Stream  //for the s3 interface 
 But I want to use this same code on both my Windows test server and my Linux server. Originally I had \ but read a post that said never to  use \. How do I create a module that works on both Windows and Linux?


[Thu Sep 20 20:48:57.361710 2018] [proxy_fcgi:error] [pid 1879:tid 140116345394944] [client 69.124.178.164:52098] AH01071: Got error 'PHP message: PHP Warning:  The use statement with non-compound name 'Aws' has no effect in /opt/bitnami/apache2/htdocs/sub_crud/application/controllers/Subit_backend.php on line 5\nPHP message: PHP Stack trace:\nPHP message: PHP   1. {main}() /opt/bitnami/apache2/htdocs/sub_crud/index.php:0\nPHP message: PHP   2. require_once() /opt/bitnami/apache2/htdocs/sub_crud/index.php:318\nPHP message: PHP Parse error:  syntax error, unexpected '/', expecting ',' or ';' in /opt/bitnami/apache2/htdocs/sub_crud/application/controllers/Subit_backend.php on line 5\nPHP message: PHP Stack trace:\nPHP message: PHP   1. {main}() /opt/bitnami/apache2/htdocs/sub_crud/index.php:0\nPHP message: PHP   2. require_once() /opt/bitnami/apache2/htdocs/sub_crud/index.php:318\n'
proof that an old dog can learn new tricks
Reply


Messages In This Thread
to use / or to use \ ? - by richb201 - 09-20-2018, 01:55 PM
RE: to use / or to use \ ? - by skunkbad - 09-20-2018, 03:57 PM
RE: to use / or to use \ ? - by richb201 - 09-20-2018, 11:32 PM
RE: to use / or to use \ ? - by InsiteFX - 09-21-2018, 04:00 AM
RE: to use / or to use \ ? - by richb201 - 09-21-2018, 04:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB