Forum poświęcone PHP

Posted by NET  • 

[Newbie] [C++] Zabezpieczenie przed utworzeniem obiektu
Mam taki kod: class A { }; class B : public A { }; Czy da się zrobić tak, aby w programie nie można było utworzyć obiektu klasy A?
Sun,04 Jan 2009 01:42:01 +0100

[Newbie] [Delphi] Przerwanie wyszukiwania...
witam mam banalny problem ale jakos nie potrafie sobie z nim poradzic [glowa] [wstyd] chodzi o to, ze w programie mam wyszukiwanie w czasie rzeczywistym: jak tylko zaczynam cos wpisywac do edita to wyszukiwane sa odp rzeczy. problem w tym, ze jesli wyszukiwanie trwa a ja cos zmienie w edicie to wyszukiwanie ma zostac przerwane a nast rozpoczete na nowo. no i wlasnie z tym mam problem, z zatrzymaniem i jednoczesnym rozpoczeciem nowego. help [glowa] dzieki z gory
Sun,04 Jan 2009 01:23:45 +0100

[Newbie] [C++]Pomoc w rozpracowaniu kodu
Witam :) Chciałbym prosić o pomoc w rozpracowaniu kodu programu. Jest to saper napisany poprzez tablice dwuwymiarowe, których wartości ja zdefiniowane globalnie. Program znalazłem w zwykłym C i przerobiłem go na polskie określenia oraz na język c++. Powyrzucałem też nieco zbędnych linijek kodów zastępując łatwiejszymi rozwiązaniami oraz wprowadziłem generator losowych bomb ;) Generalnie rzecz biorąc rozumiem co nieco funkcji, ale chciałbym się upewnić co do moich domysłów. #include "stdafx.h" #include #include #include #include using namespace std; const int lw=7; const int lk=7; const int lb=1; int tab_bomb[lw][lk]; int tab_krycie[lw][lk]; int otoczenie_bomb[lw][lk]; int pozostale_pola; int Zaleznosc(int wiersz, int kolumna) //do sprawdzenia poprawnosci wprowadzonych wspolrzednych { return wiersz>=0 && wiersz=0 && kolumna
Sun,04 Jan 2009 01:14:49 +0100

[Newbie] [C] dwuwymiarowa tablica char
Mam mały problem, tworzę dynamicznie tablice dwuwymiarowa char i chcę do niej wpisywać wyrazy gdzie w każdym wierszu będzie inny, a gdy wcisnę 0 to się wpisywanie zakończy. Ilości wyrazów jakie zostaną wpisane do tablicy nie znam więc używam zmiennej ilosc_wyrazow jako licznika ich. I mój problem jest następujący nie wiem gdzie wsadzić licznik wyrazów aby je zliczał oraz aby dobrze się tekst kopiował do tablicy dwuwymiarowej z tablicy pomocniczej. #define DLUGOSC_WIERSZA 50 int ilosc_wyrazow = 1 ; char tab_pomocnicza[50] ; tablica = (char**)malloc(DLUGOSC_WIERSZA * sizeof(char*)); for(i = 0; i < DLUGOSC_WIERSZA; ++i) { tablica[i] = (char*)malloc(ilosc_wyrazow * sizeof(char)); scanf("%s", tab_pomocnicza) ; if(tab_pomocnicza[0] == '0') { break ; } strcpy(tablica[i], tab_pomocnicza) ; } Jak narazie doszedłem do tego i kod mi wybucha, w grę wchodzi tylko ANSI C
Sun,04 Jan 2009 01:12:31 +0100

[C/C++] [C++] szablony, dziedziczenie prywatne i szalone problemy
Problem to pewnie wina złych pomysłów... Ale w skrócie, mam klasę bazową będącą teoretycznie robolem oraz klase niby interfejsu wyższego poziomu. Obie te klasy to szablony. Trudno opisać cały ten bałagan, w każdym razie kod przykładowy wygląda tak: template class BaseW { protected: T work(T a, T b) { /*tu żyją smoki*/}; public: BaseW(){/*tu składają jaja smoki*/}; ~BaseW(){/*tu giną smoki*/}; } template Class WHorse: private BaseW { protected: typedef T (BaseW::*wrk)(T,T); map workers; public: WHorse() { workers['a']=BaseW::work; //
Sun,04 Jan 2009 00:00:25 +0100

Installation on Windows systems

Rozdział 6. Installation on Windows systems

This section applies to Windows 98/Me and Windows NT/2000/XP/2003. PHP will not work on 16 bit platforms such as Windows 3.1 and sometimes we refer to the supported Windows platforms as Win32. Windows 95 is no longer supported as of PHP 4.3.0.

There are two main ways to install PHP for Windows: either manually or by using the installer.

If you have Microsoft Visual Studio, you can also build PHP from the original source code.

Once you have PHP installed on your Windows system, you may also want to load various extensions for added functionality.

Ostrzeżenie

There are several all-in-one installers over the Internet, but none of those are endorsed by PHP.net, as we believe that the manual installation is the best choice to have your system secure and optimised.

Windows Installer (PHP 5.2 and later)

The Windows PHP installer for later versions of PHP is built using MSI technology using the Wix Toolkit (http://wix.sourceforge.net/). It will install and configure PHP and all the built-in and PECL extensions, as well as configure many of the popular web servers such as IIS, Apache, and Xitami.

First, install your selected HTTP (web) server on your system, and make sure that it works. Then proceed with one of the following install types.

Normal Install

Run the MSI installer and follow the instructions provided by the installation wizard. You will be prompted to select the Web Server you wish to configure first, along with any configuration details needed.

You will then be prompted to select which features and extensions you wish to install and enable. By selecting "Will be installed on local hard drive" in the drop-down menu for each item you can trigger whether to install the feature or not. By selecting "Entire feature will be installed on local hard drive", you will be able to install all sub-features of the included feature ( for example by selecting this options for the feature "PDO" you will install all PDO Drivers ).

Ostrzeżenie

It is not recommended to install all extensions by default, since many other them require dependencies from outside PHP in order to function properly. Instead, use the Installation Repair Mode that can be triggered thru the 'Add/Remove Programs' control panel to enable or disable extensions and features after installation.

The installer then sets up PHP to be used in Windows and the php.ini file, and configures certain web servers to use PHP. The installer will currently configure IIS (CGI mode only), Apache, Xitami, and Sambar Server; if you are using a different web server you'll need to configure it manually.

Silent Install

The installer also supports a silent mode, which is helpful for Systems Administrators to deploy PHP easily. To use silent mode:

msiexec.exe /i php-VERSION-win32-install.msi /q

You can control the install directory by passing it as a parameter to the install. For example, to install to e:\php:

msiexec.exe /i php-VERSION-win32-install.msi /q INSTALLDIR=e:\php
You can also use the same syntax to specify the Apache Configuration Directory (APACHEDIR), the Sambar Server directory (SAMBARDIR), and the Xitami Server directory (XITAMIDIR).

You can also specify what features to install. For example, to install the mysqli extension and the CGI executable:

msiexec.exe /i php-VERSION-win32-install.msi /q ADDLOCAL=cgi,ext_php_mysqli

The current list of Features to install is as follows:

MainExecutable - php.exe executable
ScriptExecutable - php-win.exe executable
ext_php_* - the various extensions ( for example: ext_php_mysql for MySQL )
apache13 - Apache 1.3 module
apache20 - Apache 2.0 module
apache22 - Apache 2,2 module
apacheCGI - Apache CGI executable
iis4ISAPI - IIS ISAPI module
iis4CGI - IIS CGI executable
NSAPI - Sun/iPlanet/Netscape server module
Xitami - Xitami CGI executable
Sambar - Sambar Server ISAPI module
CGI - php-cgi.exe executable
PEAR - PEAR installer
Manual - PHP Manual in CHM Format

For more information on installing MSI installers from the command line, visit http://msdn.microsoft.com/library/en-us/msi/setup/command_line_options.asp