Good day. There were problems during practice during the self-study of the book by Robin Nixon - Create dynamic websites using PHP, MySQL, JavaScript, CSS and HTML5. 3rd ed - 2015.
On page 173 (Exploring PHP> Creating a File), enter the code to create the file and check the result in the browser.
I enter the following code into the sublime text:
<?php $fh = fopen("testfile.txt", 'w') or die("Создать файл не удалось"); $text = <<<_END Строка 1 Строка 2 Строка 3 _END; fwrite($fh, $text) or die("Сбой записи файла"); fclose($fh); echo "Файл 'testfile.txt' записан успешно"; Then I save the file as testfile.txt and testfile.php, open it in the browser, but it doesn’t do anything.
The same is true when entering other examples (print functions, etc. - some biliberd is displayed in the browser window). What and how to enter - the textbook is not written. What am I doing wrong?
Thank.