本文介绍了我的代码有什么问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
好的我有一个代码可以创建文件并输入文本但是我一直在使用 PHP 5.4
Ok I have a code that creates a file and inputs text but I keep getting errors I am using PHP 5.4
$my_file = 'file.txt'; $handle = fopen($my_file, 'w') or die('Cannot open file: '.$my_file); $data = 'This is the data'; fwrite($handle, $data);当我看看它是否有效我收到错误 解析错误:语法错误,意外'$ my_file'(T_VARIABLE) 帮助!
推荐答案my_file = ' file.txt'; my_file = 'file.txt';
handle = fopen( handle = fopen(
my_file,' w')或 die(' 无法打开文件:'。 my_file, 'w') or die('Cannot open file: '.
更多推荐
我的代码有什么问题
发布评论