Run HTML from the internal PHP server 7.1.11

Asked

Viewed 49 times

1

I wonder if it is possible (and if so, how) to run HTML files from the built-in PHP server (version 7.1.11).

I’m following Caelum HTML, CSS and PHP. In the course, after building the HTML pages, it’s time to install PHP. I installed, started and everything worked out. I navigate to the directory containing the HTML files and start the server with php -S 0.0.0.0:8080 to be accessible in the network. However, when calling the index.html in the browser I get a "The requested Resource / was not found on this server."; however, if I change the extent of the index.html for index.php page is executed (only does not open images).

  • Do you know how to start the server? What is the structure of the project folder? What have you tried to do?

  • Hi Anderson, I’m following the workbook of Caelum html, css and php. In the course after building the html pages it’s time to install php. So far so good installed and started and everything worked out. I navigate to the directory containing the html files and start the server with "php -S 0.0.0.0:8080" to be accessible on the network. But by calling index.html in the browser I get a "The requested Resource / was not found on this server." but if I change the index.html extension to index.php the page is executed (only does not open the images).

  • Can you detail in the question the whole process you have executed? Putting the folder structure, executed commands and contents of the files? I tested here and the index.html opened smoothly.

  • I changed the design location and now it works. I just put the project folder "mirrorfashion" (with the index.html file) a directory above in "C: users david documents". I did the same process to start the server: I entered the NEW project directory at the command prompt (cd users/david/Documents) and started with "php -S 0.0.0.0:8080" and now it works. If I switch to the previous location (C: users david documents computing) and start the server from there does not work. php is uncompressed in C:. Anyway, thanks for your attention, your comment was quite helpful.

  • Perhaps the application did not respond well to the accents in computação. Test without the accents and see if it works.

  • On the face fly !! I took the accent and the computer cedilla and ran cool. Thanks brother.

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.