неофициальный форум фкн

php время выполнения скрипта

в пхп5 это делается так =

$start_time = microtime(true);

// выполнение действий

$exec_time = microtime(true) - $start_time;

http://programmerz.ru/post/execute_time....

php Вставить символ в строку - в определённое место

Функция добавит одну строку (можно один символ) в другую , начиная с определённой позиции (минимум - ноль):

function strins ($str,$ins,$poz)
{
   $result="";
   $str = str_to_arr($str);
   $i=0;
   foreach ($str as $val)
   {
      if ($i==$poz)
	  {
	   $result.=$ins;
	   $result.= $val;
	   
	  } else $result.= $val;
	  	 $i++;
   }
   return $result;
 }

urlencode php

string urlencode ( string $str )

функция удобна для кодировки строки в форму ,подходящую для размещения строки в "запросовой" части URL .
Что , в свою очередь , является оптимальным способом передачи данных странице.

fsockopen php post

сигнатура функции такова:

resource fsockopen ( string $hostname [, int $port = -1 [, int &$errno [, string &$errstr [, 
float $timeout = ini_get("default_socket_timeout") ]]]] )

пример использования
ещё о сокетах = http://job-interview.ru/articles/post/194

array() php

resource mysql_query ( string $query [, resource $link_identifier ] )

пример =

<?php
$array = array(
    "foo" => "bar",
    42    => 24,
    "multi" => array(
         "dimensional" => array(
             "array" => "foo"
         )
    )
);

thread safe php что такое

Если PHP встраивается как модуль, он может выполняться в параллельных потоках. Если же он устанавливается как внешние CGI-приложения, то только как параллельный процесс. В последнем случае по барабану что он внутри своего процесса делает, поэтому он может быть non thread safe php. Если же он выполняется как часть потока или в виде отдельного потока, с среде других параллельных потоков, он должен подчиняться правилам синхронизации при доступе к ресурсам (thread safe php)

то есть =

httpd.conf скачать

#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See for detailed information.
# In particular, see
#
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#

настройка mysql

прочитать о настройке можно здесь = http://php-myadmin.ru/learning/instrumen...
скачать my.ini файл здесь (скопируйте содержимое - актуально при установке по умолчанию в program files) = http://fkn.ktu10.com/?q=node/1923

my.ini скачать

# MySQL Server Instance Configuration File
# ----------------------------------------------------------------------
# Generated by the MySQL Server Instance Configuration Wizard
#
#
# Installation Instructions
# ----------------------------------------------------------------------
#
# On Linux you can copy this file to /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options
# (@localstatedir@ for this installation) or to
# ~/.my.cnf to set user-specific options.
#
# On Windows you should keep this file in the installation directory 

innodb и myisam

myisam хранит данные таблиц в отдельных файлах innodb - всё и сразу.

Pages

Subscribe to RSS - неофициальный форум фкн