xampp
php ¶
PHP mostly runs on the web sever to generate HTML web pages, but is also used for command line scripting for Unix, Linux or even Windows, and less often, for GUI-based desktop applications. PHP is HTML embedded script which facilitates developers to write dynamically generated pages quickly. PHP is primarily used on Server-side (and JavaScript on Client Side) to generate dynamic web pages over HTTP, however you will be surprised to know that you can execute a PHP in a Linux Terminal without the need of a web browser. After PHP and Apache2 installation, we need to install PHP command Line Interpreter. # apt-get install php5-cli [Debian and alike System) # yum install php-cli [CentOS and alike System)
Short tags (example three) are only available when they are enabled via the short_open_tag php.ini configuration file directive, or if PHP was configured with the --enable-short-tags option.
Cookies are text files stored on the client computer and they are kept of use tracking purpose. PHP transparently supports HTTP cookies. There are three steps involved in identifying returning users − Server script sends a set of cookies to the browser. For example name, age, or identification number etc. Browser stores this information on local machine for future use. When next time browser sends any request to web server then it sends those cookies information to the server and server uses that information to identify the user. An alternative way to make data accessible across the various pages of an entire website is to use a PHP Session. A session creates a file in a temporary directory on the server where registered session variables and their values are stored. This data will be available to all pages on the site during that visit. The location of the temporary file is determined by a setting in the php.ini file called session.save_path. Before using any session variable make sure you have setup this path. When a session is started following things happen − PHP first creates a unique identifier for that particular session which is a random string of 32 hexadecimal numbers such as 3c7foj34c3jj973hjkop2fc937e3443. A cookie called PHPSESSID is automatically sent to the user's computer to store unique session identification string. A file is automatically created on the server in the designated temporary directory and bears the name of the unique identifier prefixed by sess_ ie sess_3c7foj34c3jj973hjkop2fc937e3443. When a PHP script wants to retrieve the value from a session variable, PHP automatically gets the unique session identifier string from the PHPSESSID cookie and then looks in its temporary directory for the file bearing that name and a validation can be done by comparing both values. A session ends when the user loses the browser or after leaving the site, the server will terminate the session after a predetermined period of time, commonly 30 minutes duration.
javascript ¶
JavaScript is a high-level, dynamic, untyped, and interpreted programming language. Alongside HTML and CSS, JavaScript is one of the three core technologies of World Wide Web content production; JavaScript is also used in environments that are not Web-based, such as PDF documents, site-specific browsers, and desktop widgets. Newer and faster JavaScript virtual machines (VMs) and platforms built upon them have also increased the popularity of JavaScript for server-side Web applications. On the client side, developers have traditionally implemented JavaScript as an interpreted language, but more recent browsers perform just-in-time compilation. Programmers also use JavaScript in video-game development, in crafting desktop and mobile applications, and in server-side network programming with run-time environments such as Node.js. When the browser encounters a block of JavaScript, it generally runs it in order, from top to bottom.
<p id="demo">JavaScript can change HTML content.</p> <button type="button" onclick="document.getElementById('demo').innerHTML = 'Hello JavaScript!'">Click Me!</button>
<button onclick="document.getElementById('myImage').src='pic_bulbon.gif'">Turn on the light</button> <img id="myImage" src="pic_bulboff.gif" style="width:100px"> <button onclick="document.getElementById('myImage').src='pic_bulboff.gif'">Turn off the light</button>
<p id="demo">JavaScript can change the style of an HTML element.</p> <button type="button" onclick="document.getElementById('demo').style.fontSize='35px'">Click Me!</button>
<p id="demo">JavaScript can hide HTML elements.</p> <button type="button" onclick="document.getElementById('demo').style.display='none'">Click Me!</button>
<p id="demo" style="display:none">Hello JavaScript!</p> <button type="button" onclick="document.getElementById('demo').style.display='block'">Click Me!</button>
mysql ¶
ÇÑ±Û ¶
string iconv ( string $in_charset , string $out_charset , string $str ) Performs a character set conversion on the string str from in_charset to out_charset.
[mysqld] collation-server = utf8_unicode_ci character-set-server = utf8 skip-character-set-client-handshake
windows 7 ¶
Warning: mysql_connect(): Access denied for user 'park_heukseok'@'localhost' (using password: YES) in C:\xampp\htdocs\common\util\db.php on line 14 Access denied for user 'park_heukseok'@'localhost' (using password: YES)
<?php /** * 1. Program CD : db_info.php * 2. Program NM : db ���� ���� * 3. Start Date : * 4. Last Date : * 5. Start Author : * 6. Last Author : */ $dbInfo=array("dbHost"=>"localhost", "dbUser"=>"park_heukseok", "dbPass"=>"park_heukseok!@#$", "dbName"=>"park_heukseok"); ?>
<? require_once("../../common/inc_manage.php"); <!--input type="hidden" name="srchGroup" value="<?=$srchGroup?>"srchGroup´Â Ç÷¡½¬¸Þ´º¿¡¼¸¸ »ç¿ë-->
db class ¶
include '../../common/inc_manage.php'; function fncGetMenuAuth($user_cd, &$menuAuth, &$menuCategory, &$defaultCategory, $default_cd) { global $db;
ubuntu ¶
Warning: mysql_connect(): Access denied for user 'park_heukseok'@'localhost' (using password: YES) in /opt/lampp/htdocs/common/util/db.php on line 14 Access denied for user 'park_heukseok'@'localhost' (using password: YES)
Notice: Undefined variable: srchGroup in /opt/lampp/htdocs/admin/common/index.php on line 16 Notice: Undefined variable: leftUrl in /opt/lampp/htdocs/admin/common/index.php on line 63 Notice: Undefined variable: mainUrl in /opt/lampp/htdocs/admin/common/index.php on line 67
php.ini ¶* /opt/lammp/etc/php.ini
; This directive determines whether or not PHP will recognize code between ; <? and ?> tags as PHP source which should be processed as such. It's been ; recommended for several years that you not use the short tag "short cut" and ; instead to use the full <?php and ?> tag combination. With the wide spread use ; of XML and use of these tags by other languages, the server can become easily ; confused and end up parsing the wrong code in the wrong context. But because ; this short cut has been a feature for such a long time, it's currently still ; supported for backwards compatibility, but we recommend you don't use them. ; Default Value: On ; Development Value: Off ; Production Value: Off ; http://php.net/short-open-tag short_open_tag=Off ; XAMPP for Linux is currently old fashioned short_open_tag=On
Áú¹® ¶
|
It is the wise bird who builds his nest in a tree. |