Expert PHP 5 Tools phần 9

Nhiệm vụ sao chép sẽ chăm sóc di chuyển các mẫu để bao gồm / lớp / thư mục mà ứng dụng hy vọng nó được. Tuy nhiên, có một vài bước mở rộng liên quan đến nhiệm vụ này bảo đảm một cái nhìn thứ hai. Có hai thẻ đang được sử dụng trong nhiệm vụ sao chép. | Chapter 8 The copy task takes care of moving the template to the includes classes directory where the application expects it to be. However there are a couple of extra steps involved in this task that warrant a second look. There are two sub-tags that are being used inside the copy task. First the filterchain task allows you to process the files that are being copied. In our case we are using the expandproperties task to replace all placeholders with properties. Second the fileset task allows us to construct a list of files by including or excluding individual files based on various criteria such as regular expressions that match the path or name of the files. For our purposes the list consists of only a single file which we include by name. Maintenance page At this point we have completed all preliminary steps for upgrading the site. For the actions we want to ensure that normal traffic to the site cannot interfere. Simultaneously it is now necessary to let the users know that the site will be temporarily unavailable by redirecting all traffic to a maintenance page that informs the user that the site is temporarily unavailable due to maintenance. I have such a page called in the root of the publicly accessible directory htdocs. I use Apache as my web server which supports per-directory configuration files typically called .htaccess files. For this to work you have to make sure that .htaccess files are enabled. The following code also requires the mod_rewrite module to be enabled in Apache which we use to change request URLs and redirect the user s browser. Basically we are creating a local Apache configuration file that uses mod_rewrite to temporarily redirect all requests to the page. target name disp-maint description Export the site s files from subversion to the local target directory. -- check whether there already is an .htaccess file -- available file htdocs .htaccess property htaccess_exists

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
2    159    1    22-05-2024
2    492    1    22-05-2024
Đã 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.