dqx13503925528 2017-03-06 11:39
浏览 31

fwrite无法在包含文件中工作

I have one php file "test.php" which have below code

$file = fopen("../testwrite.php","w");
echo fwrite($file,"<h1>this is for testing</h1>");
fclose($file);

now I have one more php file named original.php in which I have included test.php. But when I run original.php then fwrite function have no affect. "testwrite.php" is not writing.

but if I direct run test.php then it is working and testwrite.php will write but content.

content of original.php is below,

<?php include_once 'test.php'; 

// other process ?>

So what is issue here?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Python报错怎么解决
    • ¥15 simulink如何调用DLL文件
    • ¥15 关于用pyqt6的项目开发该怎么把前段后端和业务层分离
    • ¥30 线性代数的问题,我真的忘了线代的知识了
    • ¥15 有谁能够把华为matebook e 高通骁龙850刷成安卓系统,或者安装安卓系统
    • ¥188 需要修改一个工具,懂得汇编的人来。
    • ¥15 livecharts wpf piechart 属性
    • ¥20 数学建模,尽量用matlab回答,论文格式
    • ¥15 昨天挂载了一下u盘,然后拔了
    • ¥30 win from 窗口最大最小化,控件放大缩小,闪烁问题