2012-05-18 2 views
0

을에서 설정되지 않는 나는 다음과 같은 쿼리 문자열이 있습니다

[u] => http://news.yahoo.com/blogs/sideshow/man-fathered-30-kids-needs-break-child-support-140439765.html 

내 GET 요청 : 내 $의 _GET 배열에있는 유일한 것은 다음이다 그러나

[QUERY_STRING] => u=http%3A%2F%2Fnews.yahoo.com%2Fblogs%2Fsideshow%2Fman-fathered-30-kids-needs-break-child-support-140439765.html&t=%3Cp%20id=%22yui_3_4_0_22_1337372504263_287%22%3EAnd%20you%20thought%20Octomom%20had%20her%20hands%20full%E2%80%94a%20Tennessee%20man%20who%20has%20fathered%2030%20children%20is%20asking%20the%20courts%20for%20a%20break%20on%20child%20support.%3C/p%3E%0A%3Cp%20id=%22yui_3_4_0_22_1337372504263_286%22%3EDesmond%20Hatchett,%2033,%20of%20Knoxville%20has%20children%20with%2011%20different%20women,%20%3Ca%20href=%22http://wreg.com/2012/05/16/tn-man-fathers-30-kids-but-cant-support-any/%22%20target=%22_blank%22%3Ereports%20WREG-TV%3C/a%3E.%3C/p%3E%0A%3Cp%20id=%22yui_3_4_0_22_1337372504263_285%22%3EThe%20state%20already%20takes%20half%20his%20paycheck%20and%20divides%20it%20up,%20which%20doesn%27t%20amount%20to%20much%20when%20Hatchett%20is%20making%20only%20minimum%20wage.%20Some%20of%20the%20moms%20receive%20as%20little%20as%20$1.49%20a%20month.%20The%20oldest%20child%20is%2014%20years%20old.%3C/p%3E%0A%3Cp%20id=%22yui_3_4_0_22_1337372504263_284%22%3EHatchett%20explains%20how%20he%20reached%20such%20a%20critical%20mass:%20He%20had%20four%20kids%20in%20the%20same%20year.%20Twice.%3C/p%3E%0A%3Cp%20id=%22yui_3_4_0_22_1337372504263_283%22%3E%3Ca%20href=%22http://www.youtube.com/watch?v=RTZk1y8iaho%22%20target=%22_blank%22%20id=%22yui_3_4_0_22_1337372504263_308%22%3EBack%20in%202009%20when%20Hatchett%20%3C/a%3Ewas%20in%20court%20to%20answer%20charges%20that%20many%20of%20the%20mothers%20were%20not%20receiving%20child%20support,%20he%20had%2021%20children.%20At%20the%20time,%20he%20said%20he%20was%20not%20going%20to%20father%20any%20more%20kids,%20but%20he%20ended%20up%20having%20nine%20more%20in%20the%20past%20three%20years.%3C/p%3E%0A%3Cp%20id=%22yui_3_4_0_22_1337372504263_282%22%3EThe%20state%20cannot%20order%20Hatchett%20to%20stop%20making%20babies.%20He%20hasn%27t%20broken%20any%20laws,%20according%20to%20the%20report.%3C/p%3E 

을 2k 문자 미만이고 서버가 전체 문자열을 수신 했으므로 어떤 일이 벌어 질지 잘 모릅니다.

+0

로컬 서버에서 테스트되었고 모든 것이 GET 배열로 전달되었습니다. 목록에 표시된 부분 다음의 앰퍼샌드는 URL의 다음 부분을 GET 배열의 다른 요소로 강제합니다. – TheOx

답변

1

시험해보기 :

print_r ($ _ GET);

Array 
(
    [u] => http://news.yahoo.com/blogs/sideshow/man-fathered-30-kids-needs-break-child-support-140439765.html 
    [t] => <p id="yui_3_4_0_22_1337372504263_287">And you thought Octomom had her hands full—a Tennessee man who has fathered 30 children is asking the courts for a break on child support.</p> 
<p id="yui_3_4_0_22_1337372504263_286">Desmond Hatchett, 33, of Knoxville has children with 11 different women, <a href="http://wreg.com/2012/05/16/tn-man-fathers-30-kids-but-cant-support-any/" target="_blank">reports WREG-TV</a>.</p> 
<p id="yui_3_4_0_22_1337372504263_285">The state already takes half his paycheck and divides it up, which doesn't amount to much when Hatchett is making only minimum wage. Some of the moms receive as little as $1.49 a month. The oldest child is 14 years old.</p> 
<p id="yui_3_4_0_22_1337372504263_284">Hatchett explains how he reached such a critical mass: He had four kids in the same year. Twice.</p> 
<p id="yui_3_4_0_22_1337372504263_283"><a href="http://www.youtube.com/watch?v=RTZk1y8iaho" target="_blank" id="yui_3_4_0_22_1337372504263_308">Back in 2009 when Hatchett </a>was in court to answer charges that many of the mothers were not receiving child support, he had 21 children. At the time, he said he was not going to father any more kids, but he ended up having nine more in the past three years.</p> 
<p id="yui_3_4_0_22_1337372504263_282">The state cannot order Hatchett to stop making babies. He hasn't broken any laws, according to the report.</p> 
) 

두 번째 값이 거기에있다 :이 결과를 얻을 같은 쿼리 문자열을 사용하여 내 경우

.

아마 PHP의 구성입니다.

- suhosin.get.max_name_length (기본값 : 64) URL을 통해 등록 된 변수의 최대 길이를 정의합니다. 배열 변수의 경우 이것은 인덱스 앞에있는 이름입니다.

- suhosin.get.max_totalname_length (초기 값 : 256)를 통해 등록 할 때 URL 총 변수 이름의 최대 길이를 정의한다. 배열 변수의 경우 모든 인덱스가 포함됩니다.

- suhosin.get.max_value_length (초기 값 : 512) 는 URL을 통해 등록 된 변수의 최대 길이를 정의한다.

Greatings.

+0

실제로 제가 위에 게시 한 것들에 대해 print_r을했습니다. 어쩌면 내 웹 호스트에 문제가 될 수 있습니다. – SamFisher83

+0

방금 ​​내 대답을 편집했습니다. –

+0

나는 그게 무엇인지 추측합니다. 감사 – SamFisher83

0

쿼리 문자열을 자세히 보면 문제의 원인이됩니다.

html 확장자 이후에 &을 자세히 살펴보십시오. PHP 스크립트에 전달하기 전에 전체 URL에서 urlencode을 사용해야합니다.

$link='http://news.yahoo.com/blogs/sideshow/man-fathered-30-kids-needs-break-child-support-140439765.html&t=<p id="yui_3_4_0_22_1337372504263_287">And you thought Octomom had her hands fulla Tennessee man who has fathered 30 children is asking the courts for a break on child support.</p><p id="yui_3_4_0_22_1337372504263_286">Desmond Hatchett, 33, of Knoxville has children with 11 different women, <a href="http://wreg.com/2012/05/16/tn-man-fathers-30-kids-but-cant-support-any/" target="_blank">reports WREG-TV</a>.</p><p id="yui_3_4_0_22_1337372504263_285">The state already takes half his paycheck and divides it up, which doesn\'t amount to much when Hatchett is making only minimum wage. Some of the moms receive as little as .49 a month. The oldest child is 14 years old.</p><p id="yui_3_4_0_22_1337372504263_284">Hatchett explains how he reached such a critical mass: He had four kids in the same year. Twice.</p><p id="yui_3_4_0_22_1337372504263_283"><a href="http://www.youtube.com/watch?v=RTZk1y8iaho" target="_blank" id="yui_3_4_0_22_1337372504263_308">Back in 2009 when Hatchett </a>was in court to answer charges that many of the mothers were not receiving child support, he had 21 children. At the time, he said he was not going to father any more kids, but he ended up having nine more in the past three years.</p><p id="yui_3_4_0_22_1337372504263_282">The state cannot order Hatchett to stop making babies. He hasn\'t broken any laws, according to the report.</p>'; 
echo '<a href="script.php?u=' . urlencode($link) . '">The link title</a>' 

그래야합니다.