gdebojyoti.mail96
Member
- Messages
- 89
- Reaction score
- 0
- Points
- 6
I want to save the following line in a file in PHP:
For this, I am using the following code:
But when I open the file, I find the following statement:
What am I doing wrong?
By the way, I am using WAMP server.
Code:
<?php $value=15; ?>
For this, I am using the following code:
Code:
$myFileHandle=fopen($myurl,'w'); // $myurl = URL of the file
$myData="<?php $value=".$value."; ?>"; // $value = 15
fwrite($myFileHandle,$myData);
fclose($myFileHandle);
But when I open the file, I find the following statement:
Code:
<?php 15=15; ?>
What am I doing wrong?
By the way, I am using WAMP server.
Last edited: