开发者

create a html file in php by user [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 开发者_C百科11 years ago.

well I want to make a feature to my cms which user can make some static page by its orders , such

file name , Content , picture ....

for example , user can make an about us.. that file name is about.php , have a custom content in it , and all of these are given by a user in another php page

please recommend me to use which php function to make these , tnx


How about some code like this:

$fh = fopen($filename, 'w') or die("can't open file");
fwrite($fh, '<html><body>');
fwrite($fh, "<h1>$title</h1>$text");
fwrite($fh, '</body></html>');
fclose($fh);

where filename, title and text are filled with some form data, or read from a file.

I hope this is what you meant.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜