<?php
$file = fopen("configuration.conf","w+");
$settings['LogEnabled'] = "true";
$settings['Pass'] = "pass";
$settings['ShowWarning'] = "true";
fwrite($file,serialize($settings));
$path = "configuration.conf";
$file2 = file_get_contents($path);
$settings2=unserialize($file2);
echo($settings2['LogsEnabled']);
?>
跑步时应该显示“真实”。怎么了?
我试过fread和fopen for $ file2,但都没有工作。
编辑:它不会抛出错误。
该文件具有权限0740