Jump to content

String concatenation problem


adwaitjoshi

Recommended Posts

I am using the code posted here to do something with a third party software

 

http://www.interworks.com/blogs/jvarner/2012/07/12/proxying-tableau-server-content-using-php-and-trusted-tickets

 

however its utterly frutrating that something as simple as 

 

  1. $fullUrl = "http://{$server}/trusted/{$ticket}/{$url}";

 

returns me the following

 

moOaH6BAKFMGGszd_IQHTvpAhttp://<server>/trusted/1/views/<dashboard>?format=png

 

instead of

 

http://<server>/trusted/moOaH6BAKFMGGszd_IQHTvpA/views/<dashboard>?format=png

 

completely beats me. Any idea why ? Is it something to do with the variable $ticket which has the value of moOaH6BAKFMGGszd_IQHTvpA in this case ? 

Link to comment
https://forums.phpfreaks.com/topic/289068-string-concatenation-problem/
Share on other sites

if

$server  is set to   <server>   and

$ticket  is set to   moOaH6BAKFMGGszd_IQHTvpA   and

$url     is set to   <dashboard>?format=png

 

Then the code you posted should resemble this output

http://<server>/trusted/moOaH6BAKFMGGszd_IQHTvpA/views/<dashboard>?format=png

The output you posted, has the ticket string before the http:// and $ticket has been replaced by 1.

 

It seems you may be echo'ing the output of the curl response rather than capturing the response into a variable. It is hard to tell with the single line of code you posted

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.