开发者

create a html file in php by user [closed]

开发者 https://www.devze.com 2023-03-30 17:46 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
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

精彩评论

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