{"id":1084,"date":"2016-11-15T10:15:08","date_gmt":"2016-11-15T10:15:08","guid":{"rendered":"http:\/\/invisiblezero.net\/?p=1067"},"modified":"2024-07-22T09:21:32","modified_gmt":"2024-07-22T09:21:32","slug":"start-php-builtin-server-for-a-project-without-apache","status":"publish","type":"post","link":"http:\/\/ndthanh.com\/start-php-builtin-server-for-a-project-without-apache\/","title":{"rendered":"Start PHP builtin server for a Project without Apache"},"content":{"rendered":"

To PHP developer, setting up new development environment is a repetitive job, it’s boring and take time when you want to test something quick on system that’s not yours. luckily, PHP include a built in server out of box from version 5.6 and today i’m going to show you how to execute it.<\/p>\n

first, you will need a php project with index.php file. Then use terminal emulator to go to project root and execute this command :<\/p>\n

\nphp -S localhost:8080\n<\/pre>\n

You can now\u00a0 access your project at this address on your browser : localhost:8080 , just simple like that.<\/p>\n

Default entry point is index.php, but you can access other file.<\/p>\n

 <\/p>\n

This is good to see all requests come in or error. Can be used on the fly for quick debugging. hope you find it useful \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"

To PHP developer, setting up new development environment is a repetitive job, it’s boring and take time when you want to test something quick on system that’s not yours. luckily, PHP include a built in server out of box from version 5.6 and today i’m going to show you how to execute it. first, you…<\/p>\n

Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":1474,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[60,45],"tags":[49,61,51],"aioseo_notices":[],"views":30,"_links":{"self":[{"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/posts\/1084"}],"collection":[{"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/comments?post=1084"}],"version-history":[{"count":1,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/posts\/1084\/revisions"}],"predecessor-version":[{"id":1274,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/posts\/1084\/revisions\/1274"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/media\/1474"}],"wp:attachment":[{"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/media?parent=1084"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/categories?post=1084"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/tags?post=1084"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}