I have added an external php script via a UDT to my content page. 
Everything works fine except i want each link within the script to target self.
( at the moment every link from the script takes me away from cms and onto the external php script)
The external script php has $_SERVER['PHP_SELF'];  set.
Do i need  bespoke coding or does any one know a quick way to fix this. 
UDT test one.. 
include("/home/client/public_html/folder1/newscript.php");
results in url linking like 
http://www.client.co.uk/index.php?jabs=1
UDT test two
$includeFile = file_get_contents("http://www.client.co.uk/folder1/newscript.php");
echo $includeFile;
results in url links like www.client.co.uk/folder1/newscript.php?jabs=1
A massive thanks for any tips or guidance.
			
			
									
						
										
						php include via udt - how do i get target_self?
- 
				lainyrache
 - Forum Members

 - Posts: 106
 - Joined: Thu Oct 05, 2006 11:27 am
 
- 
				Peciura
 
Re: php include via udt - how do i get target_self?
To include php to UDT there should not be '' in yout file.
Consider using$_SERVER['REQUEST_URI'] or $_SERVER['REQUEST_URL'] instead of $_SERVER['PHP_SELF'].
			
			
									
						
										
						Consider using$_SERVER['REQUEST_URI'] or $_SERVER['REQUEST_URL'] instead of $_SERVER['PHP_SELF'].
- 
				lainyrache
 - Forum Members

 - Posts: 106
 - Joined: Thu Oct 05, 2006 11:27 am
 
Solved: Re: php include via udt - how do i get target_self?
Hi sorry for the delay getting back on this. Thank you for tips above.
It was all set up okay.. just the url rewrites were confusing.
I used $_SERVER['PHP_SELF'];
then altered all direct links for rewrites from eg
?ac=search">Search
to
?page=pagename&ac=search">earch
Its a bit specific to this script ( and probably not ideal to do it this way) but might help someone further down the line.
			
			
									
						
										
						It was all set up okay.. just the url rewrites were confusing.
I used $_SERVER['PHP_SELF'];
then altered all direct links for rewrites from eg
?ac=search">Search
to
?page=pagename&ac=search">earch
Its a bit specific to this script ( and probably not ideal to do it this way) but might help someone further down the line.
