/    Sign up×
Community /Pin to ProfileBookmark

library phpimageworkshop error: unexpected ‘)’

Hello,

I am using library phpimageworkshop ([url]http://phpimageworkshop.com/installation.html[/url]) and you see the installation.
I have the PHPImageWorkshop folder added to my folder.

So I install the library with this code:

[code=php]use PHPImageWorkshopImageWorkshop;

$layer = ImageWorkshop::initXXX(…);[/code]

But I get the error: Parse error: syntax error, unexpected ‘)’ on line 11 and that is line:

[code=php]$layer = ImageWorkshop::initXXX(…);[/code]

how can I fix this?
can someone help me?

thanks in advance

to post a comment
PHP

6 Comments(s)

Copy linkTweet thisAlerts:
@ginerjmJan 24.2017 — Not at all familiary with 'use' nor ImageWorkshop but how about a missing required parameter for that function/method?
Copy linkTweet thisAlerts:
@wesley5authorJan 24.2017 — ok, can you give a example of that parameter? I have no idea.
Copy linkTweet thisAlerts:
@ginerjmJan 24.2017 — Uh....

If you are planning on using this class and its methods, then you should have a reference manual/guide that shows YOU how to use it. As I said I am unfamiliar with this class. All I did was point out that if the right paren is "unexpected" then perhaps something like a parm WAS expected before the closing paren
Copy linkTweet thisAlerts:
@NogDogJan 24.2017 — "..." is not a valid argument to a function call, if that's what you actually have in your code?
Copy linkTweet thisAlerts:
@wesley5authorJan 24.2017 — yes, i have "..." in my code, because I don't know the parameter, do you know that?
Copy linkTweet thisAlerts:
@NogDogJan 24.2017 — I suspect you want to do something like this, replacing the path with wherever you actual image file is (taken from http://phpimageworkshop.com/doc/2/layer.html):
[code=php]
ImageWorkshop::initFromPath('/path/to/images/picture.jpg');
[/code]

But their documentation is not ideal, so I may be wrong.
×

Success!

Help @wesley5 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...