![]() |
![]() ![]() |
![]() |
tudsy |
![]()
Post
#1
|
Advanced Member ![]() ![]() ![]() ![]() Group: Members Posts: 137 Joined: 30-September 14 Member No.: 21,611 ![]() |
Hi
I have decided to do the watermarking by php. At the moment, I am having problems in converting from jS to php and php to js. Can any one help? The relevant code is in the picname function in ecovib2d_adriant.php. Thanks. Attached File(s) ![]() |
CharlesEF |
![]()
Post
#2
|
This is My Life ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,490 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 ![]() |
I haven't had time to go over your code. But, since you want to use PHP now have you looked at this page?
|
CharlesEF |
![]()
Post
#3
|
This is My Life ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,490 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 ![]() |
Ok, I glanced over your code. I didn't get very far when I saw this:
CODE var path = 'http://103.226.223.161/~ecovibdc/ECOVIB2D/MYART/' + personname + '/Graphic/' + picname; . Then I saw this: CODE <?php $path='"+path+"'; watermarkImage ($path,'ECOVIB2D©', $picnamew); ?> . It looks like you defined a javascript variable and then tried to use that variable in a PHP call. As far as I know, you can't do it that way. If you have a javascript variable you want to use in PHP then you must send that variable to the server for PHP to use. You do that using a POST or GET request. Seems to me your watermark function should be setup to work using AJAX. Your current code will not pass the javascript variable to the server so your PHP $path variable isn't what you think it is. |
CharlesEF |
![]()
Post
#4
|
This is My Life ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,490 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 ![]() |
Well, I haven't heard anything from you. Did you get it working? Attached is a couple of sample files: 'test.php' will show a watermarked image when you load the page. 'test.html' will let you select a picture from the drop down. Once a picture is selected a javascript AJAX call is made to display the watermarked image on screen.
If you haven't got it working then these examples should help. ![]() |
tudsy |
![]()
Post
#5
|
Advanced Member ![]() ![]() ![]() ![]() Group: Members Posts: 137 Joined: 30-September 14 Member No.: 21,611 ![]() |
Well, I haven't heard anything from you. Did you get it working? Attached is a couple of sample files: 'test.php' will show a watermarked image when you load the page. 'test.html' will let you select a picture from the drop down. Once a picture is selected a javascript AJAX call is made to display the watermarked image on screen. If you haven't got it working then these examples should help. ![]() No I have not got it working and thank you for the examples. |
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 22nd April 2018 - 01:24 PM |