Warning: file_put_contents : failed to open stream: No such file or directory in php
<pre><code>&lt;?PHP

class couty{
   public function write ($a,$b){

       @session_start();
       if(!(isset($_SESSION[`login`]) &amp;&amp; $_SESSION[`login`] != ``)){
         echo "you must Logged in to create a PHP file";
       }
       else{
            file_put_contents($a,$b);
            exit;
       }
}
}

$c = `&lt;!DOCTYPE HTML&gt;&lt;HTML&gt;
&lt;head&gt;&lt;title&gt;&lt;/title&gt;&lt;/head&gt;
&lt;body&gt;&lt;/body&gt;
&lt;/HTML&gt;`;

if($_SERVER[`REQUEST_METHOD`] == `POST`){
   $new = trim($_POST[`coutyv`]);
   $dir = (mkdir(`folder/$new`));
   $d = new couty();
   $d-&gt;write(`$dir/$new.php`,$c);
}
?&gt;
&lt;form method = `post` action = ``&gt;
&lt;input type = `text` name = `coutyv`/&gt;
&lt;input type = `submit` name = `submit`/&gt;
&lt;/form&gt; 
</code></pre>
