Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?PHP
- $db_host="localhost";
- $db_user="root";
- $db_password="";
- $db_name="versandhandel";
- $db=new PDO("mysql:host=$db_host; dbname=$db_name; charset=utf8", $db_user, "");
- $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8" />
- <title> </title>
- </head>
- <body>
- <?PHP
- if (!file_exists("C:/Users/3406/xampp/htdocs/goe/sequ_files")) {
- echo mkdir("C:/Users/3406/xampp/htdocs/goe/sequ_files");
- echo mkdir("C:/Users/3406/xampp/htdocs/goe/sequ_files/Verz1");
- echo mkdir("C:/Users/3406/xampp/htdocs/goe/sequ_files/Verz2");
- echo mkdir("C:/Users/3406/xampp/htdocs/goe/sequ_files/Verz1/Unterverz1");
- }
- //a.txt
- $a=fopen("a.txt","w");
- for($i=1;$i<=50;$i++){
- fwrite($a,"$i abcdef\n");
- }
- //b.txt
- //$b=fopen("b.txt","w");
- //for($j=1;$j<=50;$j=$j+2){
- // fwrite($b,"$j abcdef\n");
- //}
- $zeilen=file("a.txt");
- $b=fopen("b.txt","w");
- for($j=1;$j <= count($zeilen); $j=$j+2){
- fwrite($b,"$zeilen[$j]");
- }
- //c.txt
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement