我需要将变量设置为文件名
$file = fopen("\acc\'<?php echo '$nickname''.ucg", "a+");
但文件保存为<?php echo '$nickname''.ucg
:/我需要例如myname.ucg(myname = variable $ nickname)
答案 0 :(得分:1)
你走了:
// for example
$nickname = 'johnson';
$file = fopen('./login/'.$nickname.'.ucg', 'a+');