Jump to content

McSedoy

Newbie
  • Posts

    19
  • Joined

  • Last visited

Everything posted by McSedoy

  1. Ну эт я знаю,для чего она определяется? Вот к примеру кусок кода: define('INDEX', true);// Подключаем необходимые файлы настроек.include('config.php');// Подключаем необходимые функции.include('include/function.php');include('include/function_index.php');include('include/function_comment.php');include('admin/function/function.php');// Проверяем авторизирован ли юзер как админ....................Какие обязаности здесь выполняет эта константа???
  2. Кто может обьяснить что этот код значит define (INDEX,true);
  3. Спасибо,буду знать! В практике цикл foreach () не использовал,по практикуюсь...
  4. решил проблему! Тему можно закрывать...
  5. Всем привет! Не пойму разницы в циклах for и while , как мне так циклом for удобней пользоваться, но различия между ними есть какие?
  6. Всё зависит от того как у вас настроен сервер и под какой операционкой вы сидите. Например у меня Windows и установлен пакет Endels (бывший Denver). В таком случае мне достаточно зайти в папку Endels -> usr -> local ->php5, там внутри будет php.ini. Откройте его в редакторе кода и поищите display_errors, его значение надо установить в On. Потом надо перезапустить сервер. phpinfo() можно посмотреть просто открыв на локалхосте следующий код: <?phpphpinfo(); Если выводит NULL значит соединение с базой не установлено, разбирайтесь почему спасибо за помощь, буду искать
  7. У меня сайт на локалке, где эти файлы там искать?
  8. Привет вэб-мастерам! Начал пробовать писать сайт на php+ mysql и столкнулся с такой проблемой- не выводит с базы данных информацию,при этом никакой ошибки тоже не выдает... Что это может быть? p.s. Вот код: Некий файл pozdravleniya.php <?php $pozdravleniya = getAllPozdravleniya();for ($i = 0; $i < count($pozdravleniya); $i++){$name = $pozdravleniya[$i]["name"];$text = $pozdravleniya[$i]["text"];include "pozdravleniya_shablon.php"; }?>functions.php : <?php $mysqli = false;function connectDB() {global $mysqli;$mysqli = new mysqli ("localhost", "root", "", "firstbd");$mysqli->query ("SET NAMES 'win1251'");}function getAllPozdravleniya(){global $mysqli;connectDB();$result_set = $mysqli->query("SELECT * FROM `pozdravleniya`");closeDB();$result_set = resultSetToArray($result_set);}function resultSetToArray($result_set){$array = array();while (($row = $result_set -> fetch_assoc()) !=false)$array[] = $row;return $array;}function closeDB() {global $mysqli;$mysqli->close();}?>pozdravleniya_shablon.php : <article> <h3><?php echo $name ?></h3> <p><?php echo $text ?></p></article>
  9. McSedoy

    robots.txt

    Мда,как же он будет индексироваться, если стоит запрет?
  10. Хочу знать CSS на 101%

  11. Все путем , теперь ссылки на сторонние сайты отображ. в рамке
  12. В каком смысле "потетялись" ? В папке так и лежат... В чем беда,не пойму... По какой-то причине путь прописанный в css не ведет к картинке на сервере. Перепроверте правильность названий файлов и их размещение. Вы открывали консоль? Да! Все проверил,имена файлов,размещение-все впорядке... На локалке ведь все в норме! Файлы я заново перезалил, но изменений нет...
  13. На каком вам удобнее попросите того кто в этом разбирается)) Я на полном серьезе. Человеку не представляющему как он это будет делать доставит кучу проблемм(это ещё в мягкой форме). Серверные языки это вам не html и css))) + В основном сейчас везде все на аяксе закручивается)) Мой вам совет - берите любую cms и переделывайте её Полностью согласен! Писать с нуля новичку,это тоже,что и ползти раком до киева. Так что лучше брать СМS, и переделывать ее под себя, так постепенно и освоишь все...
  14. body {margin: 0;padding: 0;line-height: 1.5em;font-family: Arial, Helvetica, sans-serif;font-size: 11px;color: #666;background: #fff;}a:link, a:visited { color: #000; text-decoration: none; font-weight: normal; } a:active, a:hover { color: #000; text-decoration: none; } p {margin: 0px;padding: 0px;} img {margin: 0px;padding: 0px;}.cleaner { clear: both; width: 100%; height: 0px; font-size: 0px; }#header_wrapper {width: 100%;height: 114px;margin: 0 auto;background: #1D4B73 ;}#header {width: 980px;margin: 0 auto;}#header #site_logo {float: left;width: 240px;height: 114px; margin-left: 20px;color: #fff;background:url(images/iskra.png) no-repeat;}/* menu */#menu_wrapper {clear: both;width: 100%;height: 41px;margin: 0 auto;background: url(images/menu_bg1.jpg) repeat-x ;} #menu {width: 980px;height: 41px;margin: 0 auto;} #menu ul {margin: 0 0 0 28px;padding: 0px;list-style: none;} #menu ul li {padding: 0px;margin: 0px;display: inline;} #menu ul li a {float: right;display: block;height: 22px;width: 128px;padding: 13px 0 0 0;background: url(images/menu.jpg) bottom no-repeat;text-align: center;font-size: 13px;text-decoration: none;color: #FFF; font-weight: bold;outline: none;} #menu li a:hover, #menu li .current {color: #000;background: url(images/menu_hover.jpg) bottom no-repeat; }/* content */ #content_wrapper {clear: both;width: 920px;margin: 0 auto;} #content {clear: both;float: left;width: 920px;margin: 20px 0 20px 20px;padding: 9px 0 9px 9px;border: 1px solid #c3c4c5;background: #d8d7d7 ; }.cont {width: 292px;margin: 20px 0 20px 20px;padding: 9px 0 9px 9px;border: 1px solid #c3c4c5;background: #d8d7d7 ; }.project_content {float: left;width: 590px;height: 30px;padding: 8px 0 0 25px;overflow: hidden;background: #1d4b73;}div.header_01 {clear: both;padding-bottom: 15px;margin-bottom: 0px;font-weight: bold ;font-size: 12px;letter-spacing: 2px;color: #000000;background: url(images/header_underline.jpg) left bottom no-repeat; }.header_02 {clear: both;font-size: 17px;letter-spacing: 2px;font-weight:bold;color: #000000;height: 35px;padding: 12px 0 0 30px ;margin: 0px 0 0px 0px;background: url(images/zag.jpg) repeat-x;}#column_w290 {float: right;width: 292px;padding: 0px 0 5px 0;margin: 0 9px 0px 3px;background: #eeeeee ;} .header_03 {clear: none;font-size: 18px;color: #dad021;font-weight: bold; padding: 0 0 5px 0;margin: 0 0 15px 0;background: url(images/banner_divider.jpg) bottom repeat-x;}.header_05 {clear: both;font-size: 12px;font-weight: bold;color: #000000;} #content_panel {clear: none;width: 600px;border: 0px solid #c6c5c5;margin-top : 45px;}.news_section {clear: both;margin: 0 10px 0 10px;}a.knopka {clear: both;display: block;width: 85px;height: 20px;padding-top: 0;background: url(images/knopka1.jpg) no-repeat;float: right;border: 1px solid #000;margin: 0 0 5px 0; color: #000;font-size: 12px;font-weight: bold;text-align: center;text-decoration: none;}a.knopka:hover { font-weight: bold; font-size:13px; color:#D0D0D0;} div.m { margin-bottom: 10px;}.border { border: solid 1px #9F9F9F;} .otstup {padding: 13px;}.section_01 {clear: both;position: relative;width: 250px;padding: 10px;border: #E6D11A solid 1px;margin: 5px 12px 0 12px;margin-bottom: 5px;background: url(images/section_middle.jpg) repeat-y;} .section_01 .top {position: absolute;width: 268px;height: 11px;top: 0px;left: 0px;background: url(images/section_top.jpg) top left no-repeat;} .section_01 .bottom {position: absolute;width: 268px;height: 11px;bottom: 0px;left: 0px;background: url(images/section_bottom.jpg) bottom left no-repeat;}#statall{background: url(images/bg_conf.gif) repeat;border: 1px solid #1D4B73;width: 600px;padding: 10px 5px 0 7px;margin: 5px 15px 7px 0;} #banner {padding: 0 0 0 0;margin: 0 0 0 0;float: right;}#footer_wrapper {clear: both;width: 100%;margin: 10px 0 0 0;background: #111d28;} #footer {width: 1000px;height: 100px;padding: 20px;margin: 0 auto;color: #828c96;background: url(images/footer_bg.jpg) bottom center no-repeat}.section_w920 {text-align: left;width: 920px;}.img{float: left;padding: 10px;} body {margin: 0;padding: 0;line-height: 1.5em;font-family: Arial, Helvetica, sans-serif;font-size: 11px;color: #666;background: #fff;}a:link, a:visited { color: #000; text-decoration: none; font-weight: normal; } a:active, a:hover { color: #000; text-decoration: none; } p {margin: 0px;padding: 0px;} img {margin: 0px;padding: 0px;}.cleaner { clear: both; width: 100%; height: 0px; font-size: 0px; }#header_wrapper {width: 100%;height: 114px;margin: 0 auto;background: #1D4B73 ;}#header {width: 980px;margin: 0 auto;}#header #site_logo {float: left;width: 240px;height: 114px; margin-left: 20px;color: #fff;background:url(images/iskra.png) no-repeat;}/* menu */#menu_wrapper {clear: both;width: 100%;height: 41px;margin: 0 auto;background: url(images/menu_bg1.jpg) repeat-x ;} #menu {width: 980px;height: 41px;margin: 0 auto;} #menu ul {margin: 0 0 0 28px;padding: 0px;list-style: none;} #menu ul li {padding: 0px;margin: 0px;display: inline;} #menu ul li a {float: right;display: block;height: 22px;width: 128px;padding: 13px 0 0 0;background: url(images/menu.jpg) bottom no-repeat;text-align: center;font-size: 13px;text-decoration: none;color: #FFF; font-weight: bold;outline: none;} #menu li a:hover, #menu li .current {color: #000;background: url(images/menu_hover.jpg) bottom no-repeat; }/* content */ #content_wrapper {clear: both;width: 920px;margin: 0 auto;} #content {clear: both;float: left;width: 920px;margin: 20px 0 20px 20px;padding: 9px 0 9px 9px;border: 1px solid #c3c4c5;background: #d8d7d7 ; }.cont {width: 292px;margin: 20px 0 20px 20px;padding: 9px 0 9px 9px;border: 1px solid #c3c4c5;background: #d8d7d7 ; }.project_content {float: left;width: 590px;height: 30px;padding: 8px 0 0 25px;overflow: hidden;background: #1d4b73;}div.header_01 {clear: both;padding-bottom: 15px;margin-bottom: 0px;font-weight: bold ;font-size: 12px;letter-spacing: 2px;color: #000000;background: url(images/header_underline.jpg) left bottom no-repeat; }.header_02 {clear: both;font-size: 17px;letter-spacing: 2px;font-weight:bold;color: #000000;height: 35px;padding: 12px 0 0 30px ;margin: 0px 0 0px 0px;background: url(images/zag.jpg) repeat-x;}#column_w290 {float: right;width: 292px;padding: 0px 0 5px 0;margin: 0 9px 0px 3px;background: #eeeeee ;} .header_03 {clear: none;font-size: 18px;color: #dad021;font-weight: bold; padding: 0 0 5px 0;margin: 0 0 15px 0;background: url(images/banner_divider.jpg) bottom repeat-x;}.header_05 {clear: both;font-size: 12px;font-weight: bold;color: #000000;} #content_panel {clear: none;width: 600px;border: 0px solid #c6c5c5;margin-top : 45px;}.news_section {clear: both;margin: 0 10px 0 10px;}a.knopka {clear: both;display: block;width: 85px;height: 20px;padding-top: 0;background: url(images/knopka1.jpg) no-repeat;float: right;border: 1px solid #000;margin: 0 0 5px 0; color: #000;font-size: 12px;font-weight: bold;text-align: center;text-decoration: none;}a.knopka:hover { font-weight: bold; font-size:13px; color:#D0D0D0;} div.m { margin-bottom: 10px;}.border { border: solid 1px #9F9F9F;} .otstup {padding: 13px;}.section_01 {clear: both;position: relative;width: 250px;padding: 10px;border: #E6D11A solid 1px;margin: 5px 12px 0 12px;margin-bottom: 5px;background: url(images/section_middle.jpg) repeat-y;} .section_01 .top {position: absolute;width: 268px;height: 11px;top: 0px;left: 0px;background: url(images/section_top.jpg) top left no-repeat;} .section_01 .bottom {position: absolute;width: 268px;height: 11px;bottom: 0px;left: 0px;background: url(images/section_bottom.jpg) bottom left no-repeat;}#statall{background: url(images/bg_conf.gif) repeat;border: 1px solid #1D4B73;width: 600px;padding: 10px 5px 0 7px;margin: 5px 15px 7px 0;} #banner {padding: 0 0 0 0;margin: 0 0 0 0;float: right;}#footer_wrapper {clear: both;width: 100%;margin: 10px 0 0 0;background: #111d28;} #footer {width: 1000px;height: 100px;padding: 20px;margin: 0 auto;color: #828c96;background: url(images/footer_bg.jpg) bottom center no-repeat}.section_w920 {text-align: left;width: 920px;}.img{float: left;padding: 10px;}
  15. В каком смысле "потетялись" ? В папке так и лежат... В чем беда,не пойму...
  16. Затрахали проблемы...

  17. Помогите пожалста в решении проблемы: после выгрузки сайта с локального сервера на хостинг не показываетнекоторые елементы страницы, сверстано все на CSS . Вот ссылка на сайт http://megaiskra.com.ua . В чем может быть проблема?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy