TAILIEUCHUNG - Secure PHP Building 50 Practical Applications Development phần 8

hoặc khách hàng tiềm năng và khuyến khích họ nói với bạn bè của họ về sản phẩm của công ty và / hoặc dịch vụ. Kỹ thuật này tiếp thị lan truyền là sử dụng rộng rãi để tăng thăm trang web và thậm chí bán sản phẩm và dịch vụ mới. Trong chương này, bạn sẽ phát triển một hệ thống Tell-a-Friend mà bạn có thể sử dụng | Chapter 17 Apache Virtual Host Maker 615 The makesite script uses the Console class from PEAR therefore the script loads this script in the beginning of the configuration file. Make sure that the PEAR_DIR variable in is set properly to point to your PEAR installation. Creating the virtual host configuration Listing 17-2 shows the standard account s virtual host configuration . This is loaded by the makesite script and processed by calling the makeVirtualHost function within the configuration file. Listing 17-2 vhosts php function makeVirtualHost www GLOBALS SYSTEM_INFO www_partition ipAddr GLOBALS SYSTEM_INFO server_ip server GLOBALS SERVER_NAME serverRoot sprintf s s www server docRoot sprintf s s htdocs www server logDir sprintf s s logs www server vhostConfig STD_VHOST_CONF Automated virtual host configuration for GLOBALS SERVER_NAME Account Type standard VirtualHost ipAddr ServerName server DocumentRoot docRoot ErrorLog logDir CustomLog logDir common Continued 616 Part IV Using PHP for Sysadmin Tasks Listing 17-2 Continued Directory Files .conf deny from all Files Directory VirtualHost STD_VHOST_CONF output config vhostConfig output makedir array SERVER_ROOT serverRoot DOCUMENT_ROOT docRoot LOG_DIR logDir return output 1 The makesite script loads this file if the account type is specified as standard. The standard template can be selected by either explicitly selecting --type standard or not specifying any account type as the standard type is set as the default in DEFAULT_ACCOUNT_TYPE . Of course you can specify any account type as the default. When the file is loaded the makeVirtualHost function is called from makesite which must return an Apache virtual server configuration enclosed in a VirtualHost . container. In this sample configuration a virtual host configuration is returned. That defines the server name using the ServerName directive

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.