Why fopen 1st Parameter Does Not Work ?
Posted: Sun Jun 18, 2017 5:52 pm
Fellow Programmers,
The following codes are supposed to creates 4 different files:
1.
2.
3.
4.
But why does the last 2 create files without the "." (dot) extension ?
Also, I have numbered all my 4 codes 1, 2, 3 & 4 but the thread shows all 4 codes numbered the same. Chrome and Fire Fox shows this.
Made a clip to demonstrate the issue. How can I send it to mods since this attachment refuses to upload video clips ?
The following codes are supposed to creates 4 different files:
1.
Code: Select all
<?php
$ourFileName = "testFile_1.txt";
$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");
fclose($ourFileHandle);
?>
2.
Code: Select all
<?php
$ourFileName = "testFile_2.txt";
$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");
fclose($ourFileName);
?>
3.
Code: Select all
<?php
$ourFileHandle = fopen(testFile_3.txt, 'w') or die("can't open file");
fclose($ourFileHandle);
?>
4.
Code: Select all
<?php
fopen(testFile_4.txt, 'w') or die("can't open file");
fclose(testFile_4.txt);
?>
But why does the last 2 create files without the "." (dot) extension ?
Also, I have numbered all my 4 codes 1, 2, 3 & 4 but the thread shows all 4 codes numbered the same. Chrome and Fire Fox shows this.
Made a clip to demonstrate the issue. How can I send it to mods since this attachment refuses to upload video clips ?