【发布时间】:2015-12-07 03:02:19
【问题描述】:
我如何创建一个 PHP 脚本来生成 PHP 文件,它就像一个表单或其他东西。我对这件事很陌生。请帮忙。我希望它生成这种格式的文件:
<?php
$infolink = 'http://minecraft.net';
$downloadlink = '***';
$ttext = 'Minecraft';
$ctext = 'Minecraft is a game about breaking and placing blocks. At first, people built structures to protect against nocturnal monsters, but as the game grew players worked together to create wonderful, imaginative things.';
$text = '
Minecraft is a game about breaking and placing blocks. At first, people built structures to protect against nocturnal monsters, but as the game grew players worked together to create wonderful, imaginative things.
It can also be about adventuring with friends or watching the sun rise over a blocky ocean. It’s pretty. Brave players battle terrible things in The Nether, which is more scary than pretty. You can also visit a land of mushrooms if it sounds more like your cup of tea.';
$video = 'XAj1acQ_CE4';
$background = 'https://pmcdeadline2.files.wordpress.com/2014/02/minecraft__140227211000.jpg';
?>
【问题讨论】:
-
一个php文件只是另一个文本文件。
-
字符串弄乱了
-
一个文件中的一个表格,我使用了默认的写入方法,我会再试一次
-
我将使用批处理文件来生成该文件,我将使用 php 上传它
-
我认为您需要的只是重新访问您的文件创建代码并查看文本实际混乱的位置,尝试使用this 之类的方法进行调试。