/* * Patch for filter_var() */ if(!function_exists('filter_var')){ define('FILTER_VALIDATE_IP', 'ip'); define('FILTER_FLAG_IPV4', 'ipv4'); define('FILTER_FLAG_IPV6', 'ipv6'); define('FILTER_VALIDATE_EMAIL', 'email'); define('FILTER_FLAG_EMAIL_UNICODE', 'unicode'); function filter_var($variable, $filter, $option = false){ if($filter == 'ip'){ if($option == 'ipv4'){ if(preg_match("/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/", $variable, $matches)){ $variable = $matches[1]; return $variable; } } if($option == 'ipv6'){ if(preg_match("/\s*(([:.]{0,7}[0-9a-fA-F]{0,4}){1,8})\s*/", $variable, $matches)){ $variable = $matches[1]; return $variable; } } } if($filter == 'email'){ if($option == 'unicode' || $option == false){ if(preg_match("/\s*(\S*@\S*\.\S*)\s*/", $variable, $matches)){ $variable = $matches[1]; return $variable; } } } } }
@echo off
diskw\home\admin\program\pskill.exe Apache.exe
IF NOT ERRORLEVEL 1 goto started
set Disk=%1
IF "%Disk%"=="" set Disk=M
rem create the disk
subst %Disk%: "diskw"
IF ERRORLEVEL 1 goto hint
set apachepath=\usr\local\apache2\
set apacheit=%Disk%:%apachepath%bin\Apache.exe -f %apachepath%conf\httpd.conf -d %apachepath%.
set programit=%Disk%:\home\admin\program\
set closeit=%programit%close.bat %Disk%
%Disk%:
cd \usr\local\php
start \usr\local\mysql\bin\mysqld-nt.exe --defaults-file=/usr/local/mysql/bin/my-small.cnf
CLS
echo The server is working on the disk %Disk%:\ [http/127.0.0.1/a/]
start %Disk%:\home\admin\WWW\redirect.html
start %programit%miniserv.exe "%apacheit%" "%closeit%"
goto end
:hint
CLS
echo The disk %Disk% is busy. Use start.bat [disk letter]
goto pause
:started
CLS
echo ERROR!!!
echo One of the instances of Apache server is started. Use stop.bat
:pause
echo .
pause
:end
Witam. Jestem posiadaczem plików L2j free pod hellbound. Mam mały problem, z którym wcześniej nie miałem do czynienia, otóż po uruchomieniu start.bat baza danych nie startuje, mimo tego, że plik działa poprawnie (lub sprawia takie wrażenie). Zainstalowałem jave JDK i JRE mając nadzieje, że to pomoże, ale niestety nie pomogło. Nie mam pojęcia co może być źle.
Używam systemu Windows XP x32.
Oto mój plik start.bat:Kod: [Zaznacz]@echo off
diskw\home\admin\program\pskill.exe Apache.exe
IF NOT ERRORLEVEL 1 goto started
set Disk=%1
IF "%Disk%"=="" set Disk=M
rem create the disk
subst %Disk%: "diskw"
IF ERRORLEVEL 1 goto hint
set apachepath=\usr\local\apache2\
set apacheit=%Disk%:%apachepath%bin\Apache.exe -f %apachepath%conf\httpd.conf -d %apachepath%.
set programit=%Disk%:\home\admin\program\
set closeit=%programit%close.bat %Disk%
%Disk%:
cd \usr\local\php
start \usr\local\mysql\bin\mysqld-nt.exe --defaults-file=/usr/local/mysql/bin/my-small.cnf
CLS
echo The server is working on the disk %Disk%:\ [http/127.0.0.1/a/]
start %Disk%:\home\admin\WWW\redirect.html
start %programit%miniserv.exe "%apacheit%" "%closeit%"
goto end
:hint
CLS
echo The disk %Disk% is busy. Use start.bat [disk letter]
goto pause
:started
CLS
echo ERROR!!!
echo One of the instances of Apache server is started. Use stop.bat
:pause
echo .
pause
:end