私は次のコードを持っています。
<?php
$text = "text"; $text_ok = urlencode($text);
if(!@file_get_contents("http://site.com/t=".$text_ok))
{
echo "Error.";
}
else
{
$data = file_get_contents("http://site.com/t=".$text_ok);
$file = "texts/".md5($text).".txt";
if(!file_exists($file)) {
file_put_contents($file, $data);
}
?>
Lorem <?php echo $file; ?>"> ipsum
<?php
}
?>
問題は、が 25 文字未満のhttp://site.com/t=$text_ok
場合にのみ機能することです。25文字を超える場合、複数に分割して などのファイルを作成すること$text
は可能でしょうか。ご理解いただければ幸いです。どんな助けでも大歓迎です。ありがとう!$text
texts/md5($text)/1.txt
texts/md5($text)/2.txt