-, 404,,.
7.
,.
:
· ...
·
·
·
·
.
8.
,,.
:
· ...
·
·
·
·
·
, «».
,,,.
9.
-,,.
. 1.
. 1
..
. 2.
. 2.
10.
.
,,. MySQL, PHP.
11.
URL,,. 1.
1.
404.php,, .Cart.php, Cat.php filter.php hits.php (,) search.phpreg.php functions.php,, ..
12.
.
:
,.
,.
: «», «», «», «».
«» «»,.
- »3.
. 3
.
:
PHP- -
MySQL-
Apache2 - -
JavaScript - alax.
XHTML - -
CSS -,
IDE NetBeans 8.0 UBUNTU linux.- LAMP (Linux, Apache, MySQL, PHP).
13.
WWW -. HTTP,,,.
WWW, Apache (.htaccess) «ishop»,.
.
1. config.php
lt ;? php
( ISHOP ) or die ( Access denied );
//( PATH raquo ;,/');
//( MODEL raquo ;, model/model.php );
//( CONTROLLER raquo ;, controller/controller.php );
//( VIEW raquo ;, views/);
//( TEMPLATE raquo ;, PATH.VIEW. ishop/);
//( PRODUCTIMG raquo ;, PATH. userfiles/product_img/baseimg/);
//( GALLERYIMG raquo ;, PATH. userfiles/product_img/);
//- 1
define ( SIZE raquo ;, 1048576);
//( HOST raquo ;, localhost );
//( USER raquo ;, root );
//( PASS raquo ;, alex );
//
define ( DB raquo ;, provod );
//- title
define ( TITLE raquo ;, );
//email ( ADMIN_EMAIL raquo ;, admin@provodraquo;);
//
define ( PERPAGE raquo ;, 9);
//
define ( ADMIN_TEMPLATE raquo ;, templates/);
mysql_connect (HOST, USER, PASS) or die ( No connect to Server ); _ select_db (DB) or die ( No connect to DB ); _ query («SET NAMES laquo ; UTF8 ») or die ( Cant set charset );
index.php -.
.
Apache-mod_rewrite.
«.htaccess»,.
2. .htaccess
utf - 8_flag magic_quotes_gpc Off404 /page404.html
On
# RewriteCond% {REQUEST_FILENAME}!- D
# RewriteCond% {REQUEST_FILENAME}!- F ^ page/( d +) /? $ Index.php? view=page amp; page_id=$ 1 ^ (hits | new | sale) /? $ index.php? view=$ 1 ^ category/( d +) /? $ index.php? view=cat amp; category=$ 1 ^ category/( d +)/page=( d +)? /? $ index.php? view=cat amp; category=$ 1 amp; page=$ 2 ^ category/( d +)/order/([az] +)/page=( d +)? /? $ index.php? view=cat amp; category=$ 1 amp; order=$ 2 amp; page=$ 3 ^ news/( d +) /? $ index.php? view=news amp; news_id=$ 1 ^ archive /? $ index.php? view=archive ^ archive/page=( d +)? /? $ index.php? view=archive amp; page=$ 1 ^ informer/( d +) /? $ index.php? view=informer amp; informer_id=$ 1 ^ product/( d +) /? $ index.php? view=product amp; goods_id=$ 1 ^ addtocart/( d +)...