博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
php开发_php环境搭建
阅读量:6683 次
发布时间:2019-06-25

本文共 28987 字,大约阅读时间需要 96 分钟。

学php开发,首先是要把环境给搭建起来,然后再写出自己的第一个"helloworld"小程序。

那么怎样搭建php开发环境呢?

我是这么做的:

1.下载工具:WAMP5-v1.7.4.rar

下载地址是:

下载后,解压,得到:wamp5_1.7.4.exe安装文件。双击它,就可以安装了。

它里面集成了Apache,mysql,php等开发所需的工具。安装完成后,只需要配置一些东西就可以了。

如:mysql的端口号,Apache服务器的端口号等等,如果你的机器上面没有安装过mysql,那么端口号

的配置就可以不用管他了;如果你机器上面没有安装过tomcat服务器,那么也没有必要去配置Apache服务器的

端口号。这时候,那可以直接进入开发状态。

下面是我机器上的mysql配置:

1 # MySQL Server Instance Configuration File  2 # ----------------------------------------------------------------------  3 # Generated by the MySQL Server Instance Configuration Wizard  4 #  5 #  6 # Installation Instructions  7 # ----------------------------------------------------------------------  8 #  9 # On Linux you can copy this file to /etc/my.cnf to set global options, 10 # mysql-data-dir/my.cnf to set server-specific options 11 # (@localstatedir@ for this installation) or to 12 # ~/.my.cnf to set user-specific options. 13 # 14 # On Windows you should keep this file in the installation directory  15 # of your server (e.g. C:\Program Files\MySQL\MySQL Server 4.1). To 16 # make sure the server reads the config file use the startup option  17 # "--defaults-file".  18 # 19 # To run run the server from the command line, execute this in a  20 # command line shell, e.g. 21 # mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server 4.1\my.ini" 22 # 23 # To install the server as a Windows service manually, execute this in a  24 # command line shell, e.g. 25 # mysqld --install MySQL41 --defaults-file="C:\Program Files\MySQL\MySQL Server 4.1\my.ini" 26 # 27 # And then execute this in a command line shell to start the server, e.g. 28 # net start MySQL41 29 # 30 # 31 # Guildlines for editing this file 32 # ---------------------------------------------------------------------- 33 # 34 # In this file, you can use all long options that the program supports. 35 # If you want to know the options a program supports, start the program 36 # with the "--help" option. 37 # 38 # More detailed information about the individual options can also be 39 # found in the manual. 40 # 41 # 42 # CLIENT SECTION 43 # ---------------------------------------------------------------------- 44 # 45 # The following options will be read by MySQL client applications. 46 # Note that only client applications shipped by MySQL are guaranteed 47 # to read this section. If you want your own MySQL client program to 48 # honor these values, you need to specify it as an option during the 49 # MySQL client library initialization. 50 # 51 [client] 52  53 port=3306 54  55  56 # SERVER SECTION 57 # ---------------------------------------------------------------------- 58 # 59 # The following options will be read by the MySQL Server. Make sure that 60 # you have installed the server correctly (see above) so it reads this  61 # file. 62 # 63 [wampmysqld] 64  65 # The TCP/IP Port the MySQL Server will listen on 66 port=3306 67  68  69 #Path to installation directory. All paths are usually resolved relative to this. 70 basedir=D:/wamp/mysql 71  72 #log file 73 log-error=D:/wamp/logs/mysql_error.log 74  75 #Path to the database root 76 datadir=D:/wamp/mysql/data 77  78 # The default character set that will be used when a new schema or table is 79 # created and no character set is defined 80 default-character-set=latin1 81  82 # The default storage engine that will be used when create new tables when 83 default-storage-engine=INNODB 84  85 # The maximum amount of concurrent sessions the MySQL server will 86 # allow. One of these connections will be reserved for a user with 87 # SUPER privileges to allow the administrator to login even if the 88 # connection limit has been reached. 89 max_connections=255 90  91 # Query cache is used to cache SELECT results and later return them 92 # without actual executing the same query once again. Having the query 93 # cache enabled may result in significant speed improvements, if your 94 # have a lot of identical queries and rarely changing tables. See the 95 # "Qcache_lowmem_prunes" status variable to check if the current value 96 # is high enough for your load. 97 # Note: In case your tables change very often or if your queries are 98 # textually different every time, the query cache may result in a 99 # slowdown instead of a performance improvement.100 query_cache_size=8M101 102 # The number of open tables for all threads. Increasing this value103 # increases the number of file descriptors that mysqld requires.104 # Therefore you have to make sure to set the amount of open files105 # allowed to at least 4096 in the variable "open-files-limit" in106 # section [mysqld_safe]107 table_cache=510108 109 # Maximum size for internal (in-memory) temporary tables. If a table110 # grows larger than this value, it is automatically converted to disk111 # based table This limitation is for a single table. There can be many112 # of them.113 tmp_table_size=13M114 115 116 # How many threads we should keep in a cache for reuse. When a client117 # disconnects, the client's threads are put in the cache if there aren't118 # more than thread_cache_size threads from before.  This greatly reduces119 # the amount of thread creations needed if you have a lot of new120 # connections. (Normally this doesn't give a notable performance121 # improvement if you have a good thread implementation.)122 thread_cache_size=12123 124 #*** MyISAM Specific options125 126 # The maximum size of the temporary file MySQL is allowed to use while127 # recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.128 # If the file-size would be bigger than this, the index will be created129 # through the key cache (which is slower).130 myisam_max_sort_file_size=100G131 132 # If the temporary file used for fast index creation would be bigger133 # than using the key cache by the amount specified here, then prefer the134 # key cache method.  This is mainly used to force long character keys in135 # large tables to use the slower key cache method to create the index.136 myisam_max_extra_sort_file_size=100G137 138 # If the temporary file used for fast index creation would be bigger139 # than using the key cache by the amount specified here, then prefer the140 # key cache method.  This is mainly used to force long character keys in141 # large tables to use the slower key cache method to create the index.142 myisam_sort_buffer_size=8M143 144 # Size of the Key Buffer, used to cache index blocks for MyISAM tables.145 # Do not set it larger than 30% of your available memory, as some memory146 # is also required by the OS to cache rows. Even if you're not using147 # MyISAM tables, you should still set it to 8-64M as it will also be148 # used for internal temporary disk tables.149 key_buffer_size=9M150 151 # Size of the buffer used for doing full table scans of MyISAM tables.152 # Allocated per thread, if a full scan is needed.153 read_buffer_size=64K154 read_rnd_buffer_size=256K155 156 # This buffer is allocated when MySQL needs to rebuild the index in157 # REPAIR, OPTIMZE, ALTER table statements as well as in LOAD DATA INFILE158 # into an empty table. It is allocated per thread so be careful with159 # large settings.160 sort_buffer_size=203K161 162 163 #*** INNODB Specific options ***164 165 166 # Use this option if you have a MySQL server with InnoDB support enabled167 # but you do not plan to use it. This will save memory and disk space168 # and speed up some things.169 #skip-innodb170 171 # Additional memory pool that is used by InnoDB to store metadata172 # information.  If InnoDB requires more memory for this purpose it will173 # start to allocate it from the OS.  As this is fast enough on most174 # recent operating systems, you normally do not need to change this175 # value. SHOW INNODB STATUS will display the current amount used.176 innodb_additional_mem_pool_size=2M177 178 # If set to 1, InnoDB will flush (fsync) the transaction logs to the179 # disk at each commit, which offers full ACID behavior. If you are180 # willing to compromise this safety, and you are running small181 # transactions, you may set this to 0 or 2 to reduce disk I/O to the182 # logs. Value 0 means that the log is only written to the log file and183 # the log file flushed to disk approximately once per second. Value 2184 # means the log is written to the log file at each commit, but the log185 # file is only flushed to disk approximately once per second.186 innodb_flush_log_at_trx_commit=1187 188 # The size of the buffer InnoDB uses for buffering log data. As soon as189 # it is full, InnoDB will have to flush it to disk. As it is flushed190 # once per second anyway, it does not make sense to have it very large191 # (even with long transactions).192 innodb_log_buffer_size=1M193 194 # InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and195 # row data. The bigger you set this the less disk I/O is needed to196 # access data in tables. On a dedicated database server you may set this197 # parameter up to 80% of the machine physical memory size. Do not set it198 # too large, though, because competition of the physical memory may199 # cause paging in the operating system.  Note that on 32bit systems you200 # might be limited to 2-3.5G of user level memory per process, so do not201 # set it too high.202 innodb_buffer_pool_size=15M203 204 # Size of each log file in a log group. You should set the combined size205 # of log files to about 25%-100% of your buffer pool size to avoid206 # unneeded buffer pool flush activity on log file overwrite. However,207 # note that a larger logfile size will increase the time needed for the208 # recovery process.209 innodb_log_file_size=10M210 211 # Number of threads allowed inside the InnoDB kernel. The optimal value212 # depends highly on the application, hardware as well as the OS213 # scheduler properties. A too high value may lead to thread thrashing.214 innodb_thread_concurrency=8

下面是我机器上的Apache的配置: 有些开发者在第一次配置apache服务的时候,老是启动不了Apache服务器,大多数原因是因为apache的端口号被占用了

解决的办法是:修改端口号,如下面我的端口号就修改为"2000"

1 #  2 # This is the main Apache HTTP server configuration file.  It contains the  3 # configuration directives that give the server its instructions.  4 # See 
for detailed information. 5 # In particular, see 6 #
7 # for a discussion of each configuration directive. 8 # 9 # Do NOT simply read the instructions in here without understanding 10 # what they do. They're here only as hints or reminders. If you are unsure 11 # consult the online docs. You have been warned. 12 # 13 # Configuration and logfile names: If the filenames you specify for many 14 # of the server's control files begin with "/" (or "drive:/" for Win32), the 15 # server will use that explicit path. If the filenames do *not* begin 16 # with "/", the value of ServerRoot is prepended -- so "logs/foo.log" 17 # with ServerRoot set to "C:/Program Files/Apache Software Foundation/Apache2.2" will be interpreted by the 18 # server as "C:/Program Files/Apache Software Foundation/Apache2.2/logs/foo.log". 19 # 20 # NOTE: Where filenames are specified, you must use forward slashes 21 # instead of backslashes (e.g., "c:/apache" instead of "c:\apache"). 22 # If a drive letter is omitted, the drive on which Apache.exe is located 23 # will be used by default. It is recommended that you always supply 24 # an explicit drive letter in absolute paths, however, to avoid 25 # confusion. 26 # 27 28 # ThreadsPerChild: constant number of worker threads in the server process 29 # MaxRequestsPerChild: maximum number of requests a server process serves 30 ThreadsPerChild 250 31 MaxRequestsPerChild 0 32 33 # 34 # ServerRoot: The top of the directory tree under which the server's 35 # configuration, error, and log files are kept. 36 # 37 # Do not add a slash at the end of the directory path. If you point 38 # ServerRoot at a non-local disk, be sure to point the LockFile directive 39 # at a local disk. If you wish to share the same ServerRoot for multiple 40 # httpd daemons, you will need to change at least LockFile and PidFile. 41 # 42 ServerRoot "D:/wamp/apache2" 43 44 # 45 # Listen: Allows you to bind Apache to specific IP addresses and/or 46 # ports, instead of the default. See also the
47 # directive. 48 # 49 # Change this to Listen on specific IP addresses as shown below to 50 # prevent Apache from glomming onto all bound IP addresses (0.0.0.0) 51 # 52 #Listen 12.34.56.78:80 53 Listen 2000 54 55 # 56 # Dynamic Shared Object (DSO) Support 57 # 58 # To be able to use the functionality of a module which was built as a DSO you 59 # have to place corresponding `LoadModule' lines at this location so the 60 # directives contained in it are actually available _before_ they are used. 61 # Statically compiled modules (those listed by `httpd -l') do not need 62 # to be loaded here. 63 # 64 # Example: 65 # LoadModule foo_module modules/mod_foo.so 66 # 67 LoadModule actions_module modules/mod_actions.so 68 LoadModule alias_module modules/mod_alias.so 69 LoadModule asis_module modules/mod_asis.so 70 LoadModule auth_basic_module modules/mod_auth_basic.so 71 #LoadModule auth_digest_module modules/mod_auth_digest.so 72 #LoadModule authn_anon_module modules/mod_authn_anon.so 73 #LoadModule authn_dbm_module modules/mod_authn_dbm.so 74 LoadModule authn_default_module modules/mod_authn_default.so 75 LoadModule authn_file_module modules/mod_authn_file.so 76 #LoadModule authz_dbm_module modules/mod_authz_dbm.so 77 LoadModule authz_default_module modules/mod_authz_default.so 78 LoadModule authz_groupfile_module modules/mod_authz_groupfile.so 79 LoadModule authz_host_module modules/mod_authz_host.so 80 LoadModule authz_user_module modules/mod_authz_user.so 81 LoadModule autoindex_module modules/mod_autoindex.so 82 LoadModule cern_meta_module modules/mod_cern_meta.so 83 LoadModule cgi_module modules/mod_cgi.so 84 #LoadModule dav_module modules/mod_dav.so 85 #LoadModule dav_fs_module modules/mod_dav_fs.so 86 #LoadModule deflate_module modules/mod_deflate.so 87 LoadModule dir_module modules/mod_dir.so 88 LoadModule env_module modules/mod_env.so 89 #LoadModule expires_module modules/mod_expires.so 90 #LoadModule file_cache_module modules/mod_file_cache.so 91 #LoadModule headers_module modules/mod_headers.so 92 LoadModule imagemap_module modules/mod_imagemap.so 93 LoadModule include_module modules/mod_include.so 94 #LoadModule info_module modules/mod_info.so 95 LoadModule isapi_module modules/mod_isapi.so 96 LoadModule log_config_module modules/mod_log_config.so 97 LoadModule mime_module modules/mod_mime.so 98 #LoadModule mime_magic_module modules/mod_mime_magic.so 99 #LoadModule proxy_module modules/mod_proxy.so100 #LoadModule proxy_ajp_module modules/mod_proxy_ajp.so101 #LoadModule proxy_balancer_module modules/mod_proxy_balancer.so102 #LoadModule proxy_connect_module modules/mod_proxy_connect.so103 #LoadModule proxy_http_module modules/mod_proxy_http.so104 #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so105 LoadModule negotiation_module modules/mod_negotiation.so106 #LoadModule rewrite_module modules/mod_rewrite.so107 LoadModule setenvif_module modules/mod_setenvif.so108 #LoadModule speling_module modules/mod_speling.so109 #LoadModule status_module modules/mod_status.so110 #LoadModule unique_id_module modules/mod_unique_id.so111 LoadModule userdir_module modules/mod_userdir.so112 #LoadModule usertrack_module modules/mod_usertrack.so113 #LoadModule vhost_alias_module modules/mod_vhost_alias.so114 #LoadModule ssl_module modules/mod_ssl.so115 LoadModule php5_module "D:/wamp/php/php5apache2_2.dll"116 117 # 'Main' server configuration118 #119 # The directives in this section set up the values used by the 'main'120 # server, which responds to any requests that aren't handled by a121 #
definition. These values also provide defaults for122 # any
containers you may define later in the file.123 #124 # All of these directives may appear inside
containers,125 # in which case these default settings will be overridden for the126 # virtual host being defined.127 #128 129 #130 # ServerAdmin: Your address, where problems with the server should be131 # e-mailed. This address appears on some server-generated pages, such132 # as error documents. e.g. admin@your-domain.com133 #134 ServerAdmin webmaster@localhost135 136 #137 # ServerName gives the name and port that the server uses to identify itself.138 # This can often be determined automatically, but we recommend you specify139 # it explicitly to prevent problems during startup.140 #141 # If your host doesn't have a registered DNS name, enter its IP address here.142 #143 ServerName localhost:2000144 145 #146 # DocumentRoot: The directory out of which you will serve your147 # documents. By default, all requests are taken from this directory, but148 # symbolic links and aliases may be used to point to other locations.149 #150 DocumentRoot "D:/wamp/www"151 152 #153 # Each directory to which Apache has access can be configured with respect154 # to which services and features are allowed and/or disabled in that155 # directory (and its subdirectories). 156 #157 # First, we configure the "default" to be a very restrictive set of 158 # features. 159 #160
161 Options FollowSymLinks162 AllowOverride None163 Order deny,allow164 Deny from all165 Satisfy all166 167 168 #169 # Note that from this point forward you must specifically allow170 # particular features to be enabled - so if something's not working as171 # you might expect, make sure that you have specifically enabled it172 # below.173 #174 175 #176 # This should be changed to whatever you set DocumentRoot to.177 #178
179 180 #181 # Possible values for the Options directive are "None", "All",182 # or any combination of:183 # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews184 #185 # Note that "MultiViews" must be named *explicitly* --- "Options All"186 # doesn't give it to you.187 #188 # The Options directive is both complicated and important. Please see189 # http://httpd.apache.org/docs/2.2/mod/core.html#options190 # for more information.191 #192 Options Indexes FollowSymLinks193 194 #195 # AllowOverride controls what directives may be placed in .htaccess files.196 # It can be "All", "None", or any combination of the keywords:197 # Options FileInfo AuthConfig Limit198 #199 AllowOverride all200 201 #202 # Controls who can get stuff from this server.203 #204 # onlineoffline tag - don't remove205 Order Allow,Deny206 Allow from all207 208
209 210 #211 # DirectoryIndex: sets the file that Apache will serve if a directory212 # is requested.213 #214
215 DirectoryIndex index.php index.php3 index.html index.htm index.html.var216
217 218 #219 # The following lines prevent .htaccess and .htpasswd files from being 220 # viewed by Web clients. 221 #222
223 Order allow,deny224 Deny from all225
226 227 #228 # ErrorLog: The location of the error log file.229 # If you do not specify an ErrorLog directive within a
230 # container, error messages relating to that virtual host will be231 # logged here. If you *do* define an error logfile for a
232 # container, that host's errors will be logged there and not here.233 #234 ErrorLog ../logs/apache_error.log235 236 #237 # LogLevel: Control the number of messages logged to the error_log.238 # Possible values include: debug, info, notice, warn, error, crit,239 # alert, emerg.240 #241 LogLevel warn242 243
244 #245 # The following directives define some format nicknames for use with246 # a CustomLog directive (see below).247 #248 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined249 LogFormat "%h %l %u %t \"%r\" %>s %b" common250 251
252 # You need to enable mod_logio.c to use %I and %O253 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio254
255 256 #257 # The location and format of the access logfile (Common Logfile Format).258 # If you do not define any access logfiles within a
259 # container, they will be logged here. Contrariwise, if you *do*260 # define per-
access logfiles, transactions will be261 # logged therein and *not* in this file.262 #263 CustomLog ../logs/access.log common264 265 #266 # If you prefer a logfile with access, agent, and referer information267 # (Combined Logfile Format) you can use the following directive.268 #269 #CustomLog logs/access.log combined270
271 272
273 #274 # Redirect: Allows you to tell clients about documents that used to 275 # exist in your server's namespace, but do not anymore. The client 276 # will make a new request for the document at its new location.277 # Example:278 # Redirect permanent /foo http://localhost/bar279 280 #281 # Alias: Maps web paths into filesystem paths and is used to282 # access content that does not live under the DocumentRoot.283 # Example:284 # Alias /webpath /full/filesystem/path285 #286 # If you include a trailing / on /webpath then the server will287 # require it to be present in the URL. You will also likely288 # need to provide a
section to allow access to289 # the filesystem path.290 291 #292 # ScriptAlias: This controls which directories contain server scripts. 293 # ScriptAliases are essentially the same as Aliases, except that294 # documents in the target directory are treated as applications and295 # run by the server when requested rather than as documents sent to the296 # client. The same rules about trailing "/" apply to ScriptAlias297 # directives as to Alias.298 #299 ScriptAlias /cgi-bin/ "D:/wamp/Apache2/cgi-bin/"300 301
302 303 #304 # "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin" should be changed to whatever your ScriptAliased305 # CGI directory exists, if you have that configured.306 #307
308 AllowOverride None309 Options None310 Order allow,deny311 Allow from all312
313 314 # 315 # Apache parses all CGI scripts for the shebang line by default.316 # This comment line, the first line of the script, consists of the symbols317 # pound (#) and exclamation (!) followed by the path of the program that 318 # can execute this specific script. For a perl script, with perl.exe in319 # the C:\Program Files\Perl directory, the shebang line should be:320 321 #!c:/program files/perl/perl322 323 # Note you _must_not_ indent the actual shebang line, and it must be the324 # first line of the file. Of course, CGI processing must be enabled by 325 # the appropriate ScriptAlias or Options ExecCGI directives for the files 326 # or directory in question.327 #328 # However, Apache on Windows allows either the Unix behavior above, or can329 # use the Registry to match files by extention. The command to execute 330 # a file of this type is retrieved from the registry by the same method as 331 # the Windows Explorer would use to handle double-clicking on a file.332 # These script actions can be configured from the Windows Explorer View menu, 333 # 'Folder Options', and reviewing the 'File Types' tab. Clicking the Edit334 # button allows you to modify the Actions, of which Apache 1.3 attempts to335 # perform the 'Open' Action, and failing that it will try the shebang line.336 # This behavior is subject to change in Apache release 2.0.337 #338 # Each mechanism has it's own specific security weaknesses, from the means339 # to run a program you didn't intend the website owner to invoke, and the340 # best method is a matter of great debate.341 #342 # To enable the this Windows specific behavior (and therefore -disable- the343 # equivilant Unix behavior), uncomment the following directive:344 #345 #ScriptInterpreterSource registry346 #347 # The directive above can be placed in individual
blocks or the348 # .htaccess file, with either the 'registry' (Windows behavior) or 'script' 349 # (Unix behavior) option, and will override this server default option.350 #351 352 #353 # DefaultType: the default MIME type the server will use for a document354 # if it cannot otherwise determine one, such as from filename extensions.355 # If your server contains mostly text or HTML documents, "text/plain" is356 # a good value. If most of your content is binary, such as applications357 # or images, you may want to use "application/octet-stream" instead to358 # keep browsers from trying to display binary files as though they are359 # text.360 #361 DefaultType text/plain362 363
364 #365 # TypesConfig points to the file containing the list of mappings from366 # filename extension to MIME-type.367 #368 TypesConfig conf/mime.types369 370 #371 # AddType allows you to add to or override the MIME configuration372 # file specified in TypesConfig for specific file types.373 #374 #AddType application/x-gzip .tgz375 #376 # AddEncoding allows you to have certain browsers uncompress377 # information on the fly. Note: Not all browsers support this.378 #379 #AddEncoding x-compress .Z380 #AddEncoding x-gzip .gz .tgz381 #382 # If the AddEncoding directives above are commented-out, then you383 # probably should define those extensions to indicate media types:384 #385 AddType application/x-compress .Z386 AddType application/x-gzip .gz .tgz387 AddType application/x-httpd-php .php388 AddType application/x-httpd-php .php3389 #390 # AddHandler allows you to map certain file extensions to "handlers":391 # actions unrelated to filetype. These can be either built into the server392 # or added with the Action directive (see below)393 #394 # To use CGI scripts outside of ScriptAliased directories:395 # (You will also need to add "ExecCGI" to the "Options" directive.)396 #397 #AddHandler cgi-script .cgi398 399 # For type maps (negotiated resources):400 #AddHandler type-map var401 402 #403 # Filters allow you to process content before it is sent to the client.404 #405 # To parse .shtml files for server-side includes (SSI):406 # (You will also need to add "Includes" to the "Options" directive.)407 #408 #AddType text/html .shtml409 #AddOutputFilter INCLUDES .shtml410
411 412 #413 # The mod_mime_magic module allows the server to use various hints from the414 # contents of the file itself to determine its type. The MIMEMagicFile415 # directive tells the module where the hint definitions are located.416 #417 #MIMEMagicFile conf/magic418 419 #420 # Customizable error responses come in three flavors:421 # 1) plain text 2) local redirects 3) external redirects422 #423 # Some examples:424 #ErrorDocument 500 "The server made a boo boo."425 #ErrorDocument 404 /missing.html426 #ErrorDocument 404 "/cgi-bin/missing_handler.pl"427 #ErrorDocument 402 http://localhost/subscription_info.html428 #429 430 #431 # EnableMMAP and EnableSendfile: On systems that support it, 432 # memory-mapping or the sendfile syscall is used to deliver433 # files. This usually improves server performance, but must434 # be turned off when serving from networked-mounted 435 # filesystems or if support for these functions is otherwise436 # broken on your system.437 #438 #EnableMMAP off439 #EnableSendfile off440 441 # Supplemental configuration442 #443 # The configuration files in the conf/extra/ directory can be 444 # included to add extra features or to modify the default configuration of 445 # the server, or you may simply copy their contents here and change as 446 # necessary.447 448 # Server-pool management (MPM specific)449 #Include conf/extra/httpd-mpm.conf450 451 # Multi-language error messages452 #Include conf/extra/httpd-multilang-errordoc.conf453 454 # Fancy directory listings455 #Include conf/extra/httpd-autoindex.conf456 457 # Language settings458 #Include conf/extra/httpd-languages.conf459 460 # User home directories461 #Include conf/extra/httpd-userdir.conf462 463 # Real-time info on requests and configuration464 #Include conf/extra/httpd-info.conf465 466 # Virtual hosts467 #Include conf/extra/httpd-vhosts.conf468 469 # Local access to the Apache HTTP Server Manual470 #Include conf/extra/httpd-manual.conf471 472 # Distributed authoring and versioning (WebDAV)473 #Include conf/extra/httpd-dav.conf474 475 # Various default settings476 #Include conf/extra/httpd-default.conf477 478 # Secure (SSL/TLS) connections479 #Include conf/extra/httpd-ssl.conf480 #481 # Note: The following must must be present to support482 # starting without SSL on platforms with no /dev/random equivalent483 # but a statically compiled-in mod_ssl.484 #485
486 SSLRandomSeed startup builtin487 SSLRandomSeed connect builtin488
489 490 491 Include "D:/wamp/apache2/conf/alias/phpmyadmin.conf"492 Include "D:/wamp/apache2/conf/alias/sqlitemanager.conf"493 Include "D:/wamp/apache2/conf/alias/hongten.conf"

2,写自己的第一个php小程序

环境搭建好了,就可以写自己的第一个php小程序了

开发工具的选择:

  有很多开发工具可供你选择:EditPlus,记事本,eclipse for php等等

在这里我推荐使用:eclipse-php-helios-win32.zip

下载地址:

这对有java开发经验的同志来说应该是好事儿.....

下面是我的第一个php小程序:helloworld.php

1 

在浏览器的地址栏上面输入:

运行效果:

helloworld!

=================================================

              大功告成!

=================================================

转载地址:http://dhxao.baihongyu.com/

你可能感兴趣的文章
静态路由与浮动路由的配置
查看>>
实现一个日期类
查看>>
安装Oracle 11g R2 单实例数据库(非asm)
查看>>
linux-wget命令笔记
查看>>
Java 内存分配全面浅析
查看>>
JVM(6)之 二次标记
查看>>
mysql实时记录客户端提交的sql语句
查看>>
多线程学习笔记(五)
查看>>
pyspider爬虫学习-教程3-Render-with-PhantomJS.md
查看>>
107个常用Javascript语句
查看>>
关联表更新
查看>>
Java递归拷贝文件夹
查看>>
从Java到C++——从union到VARIANT与CComVariant的深层剖析
查看>>
java使用jeids实现redis2.6的list操作(3)
查看>>
Android简单框架会用到的基类(2)
查看>>
flask sqlalchemy多个外键引用同张表报错sqlalchemy.exc.AmbiguousForeignKeysError
查看>>
在 CentOS6 上安装 Python 2 & 3
查看>>
svnserver配置文件详解
查看>>
Mybatis之动态SQL语句
查看>>
文件上传利器SWFUpload使用指南
查看>>