This code creates 10,000 text files in a directory called "test". Each file is named with a number from 1 to 10,000 (e.g. "1.txt", "2.txt", etc.) and contains the text "hello world" followed by the corresponding number (e.g. "hello world1", "hello world2", etc.).

The file_put_contents function is used to write the content to each file.

for $i=1; $i =10000; $i++ $filename = test$itxt; $content = hello world$i; file_put_contents$filename $content;

原文地址: https://www.cveoy.top/t/topic/bn4N 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录