Hello,
Is there a maximum length of the file address that can be included in a page?
I'm using include() to include a remote file, but the address of the remote file is about 150 characters in total.
It works fine when I shorten this to about 60, but for technical reasons the file address has to be this long.
The reason is it's a manual request to our database system and so consists of lots of &sort=ascend&field1=name&field2=postcode
etc...
Is there a maximum length of the string that can be used in the include function?
I've tried splitting the string up into more variables, then just concatenating them in the include() function but it still doesn't work - which makes me think there must be a limit on the function.
Anyone found a workaround for this?
Thanks in advance.
maximum length of include string...
Moderator: General Moderators
Unfortunately there's nothing I can do with curl as this is on our external hosted webspace.
The code I've got is...
And I get a Failed to Open error.
Though if I remove...
...from $cdmlrequest it seems to work fine. I've tried permutations of the code, playing around with which bits of the string are present to see if it's something to do with that, but there definitely seems to be a character number threshold where it's breaking.
The code I've got is...
Code: Select all
<?php
$cdmlrequest = "FMPro?-DB=F1RESULTS&-Format=f1.html&-Lay=FRONT&-SortField=DRIVER TOTAL&-SortOrder=descend&-Token.0=REAL&-FindAll";
include("http://www.domain.com/".$cdmlrequest);
?>Though if I remove...
Code: Select all
&-Lay=FRONT&-SortField=DRIVER TOTAL&-SortOrder=descend&-Token.0=REALNow it works!!
Excellent.
Thanks for pointing that out.
I didn't realise I had to put the URL encoded format in the variables, but I guess I should have worked it out!
Having to type a URL into the include function and everything.
Thanks for your help!!
PS: I didn't realise there was a problem with 'notify me when a reply is posted'.
Is that better? I've turned it off for this one.
Excellent.
Thanks for pointing that out.
I didn't realise I had to put the URL encoded format in the variables, but I guess I should have worked it out!
Having to type a URL into the include function and everything.
Thanks for your help!!
PS: I didn't realise there was a problem with 'notify me when a reply is posted'.
Is that better? I've turned it off for this one.