和你在标题上看到的。我无法使用 php 获得正确的引号。我想将一些变量导出到另一个文件,但我无法正确引用它,有人可以帮助我吗?
这是我的代码:
if($sliderconfig = fopen("./slidersettings.class.php", "w")) {
$error[] = 'Er was een probleem met het veranderen van de slider_config, contacteer site-admin.';
}
$configuration = '<?php
$slider_text = '.$slider_text.';
$text_link = '.$text_link.';
$slider_speed = '.$slider_speed.';
$text_size = '.$text_size.';
?>';
fwrite($sliderconfig, $configuration);
fclose($sliderconfig);
$message[] = 'De configuratie is succesvol bijgwerkt!';
这是输出:
<?php
$slider_text = test;
$text_link = test;
$slider_speed = test;
$text_size = test;
?>
这应该是输出:
<?php
$slider_text = 'test';
$text_link = 'test';
$slider_speed = 'test';
$text_size = 'test';
?>
现在知道如何解决此问题的任何人,如果是这样,您可以在这里回答。提前致谢。