0

次のクエリ文字列があります。

 [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

ただし、私の $_GET 配列の唯一のものは次のとおりです。

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

私の get リクエストは 2,000 文字未満で、サーバーは文字列全体を受け取ったので、何が起こっているのかわかりません。

4

2 に答える 2

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>
)

2 番目の値はそこにあります。

おそらくあなたのphpの設定です。

- suhosin.get.max_name_length (デフォルト: 64) URL を通じて登録される変数の変数名の最大長を定義します。配列変数の場合、これはインデックスの前の名前です。

- suhosin.get.max_totalname_length (デフォルト: 256) URL 経由で登録された場合の合計変数名の最大長を定義します。配列変数の場合、これにはすべてのインデックスが含まれます。

- suhosin.get.max_value_length (デフォルト: 512) URL を通じて登録される変数の最大長を定義します。

グレイティングス。

于 2012-05-18T20:47:22.150 に答える
0

クエリ文字列をよく見ると、問題の原因がわかります。

.....140439765.html&t=%3Cp%20id=....

&html拡張子の後をよく見てください。urlencodeをphpスクリプトに渡す前に、URL全体で使用する必要があります。

$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>'

それはうまくいくはずです。

于 2012-05-18T21:02:57.957 に答える