node.js_for_php_developers.pdf
(
5844 KB
)
Pobierz
www.it-ebooks.info
www.it-ebooks.info
Node.js for PHP Developers
Daniel Howard
www.it-ebooks.info
Node.js for PHP Developers
by Daniel Howard
Copyright © 2013 Daniel Howard. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (
http://my.safaribooksonline.com
)
. For more information, contact our corporate/
institutional sales department: 800-998-9938 or
corporate@oreilly.com
.
Editors:
Simon St. Laurent and Meghan Blanchette
Production Editor:
Kara Ebrahim
Copyeditor:
Jasmine Kwityn
Proofreader:
Kara Ebrahim
Indexer:
Potomac Indexing, LLC
Cover Designer:
Karen Montgomery
Interior Designer:
David Futato
Illustrator:
Rebecca Demarest
December 2012:
First Edition
Revision History for the First Edition:
2012-11-28
First release
See
http://oreilly.com/catalog/errata.csp?isbn=9781449333607
for release details.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly
Media, Inc.
Node.js for PHP Developers
, the image of the Wallachian sheep, and related trade dress are
trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trade‐
mark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and author assume no
responsibility for errors or omissions, or for damages resulting from the use of the information contained
herein.
ISBN: 978-1-449-33360-7
[LSI]
www.it-ebooks.info
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
1.
Node.js Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
The node and npm Executables 1
Stack Traces 7
Eclipse PDT 9
2.
A Simple Node.js Framework. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
An HTTP Server 21
Predefined PHP Variables 29
A PHP Example Page 42
3.
Simple Callbacks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Linearity 49
Making Code Linear 57
4.
Advanced Callbacks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Anonymous Functions, Lambdas, and Closures 66
PHP 5.3 69
PHP 4 73
5.
HTTP Responses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Headers 90
Body 92
A PHP Example Page 97
6.
Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
String Literals 109
Syntax Differences 112
iii
www.it-ebooks.info
Plik z chomika:
smifos
Inne pliki z tego folderu:
(MSPress) Writing Secure Code.pdf
(4137 KB)
Addison.Wesley,.Advanced.Programming.in.the.UNIX.Environment.(2005),.2Ed.BBL.LotB.chm
(3290 KB)
Addison.Wesley.Compilers.Principles.Techniques.and.Tools.2nd.Edition.Aug.2006.pdf
(49395 KB)
Adv-Bash-Scr-HOWTO
(568 KB)
Bash-Prog-Intro-HOWTO
(30 KB)
Inne foldery tego chomika:
CarChipTuningTools
CarChipTuningTools(1)
chiptuning_pliki-2
ECM TITANIUM
ECU Remapping Map Pack ALL BRANDS ORI MOD
Zgłoś jeśli
naruszono regulamin