Пишу скрипт для удобной инсталяции скрипта, но чтото не клеится.
PHP |
$serverdb = "localhost"; |
SQL |
CREATE TABLE `pages` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `name` TEXT NOT NULL, `comment` TEXT NOT NULL, `add_by` TEXT NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=cp1251 COLLATE=cp1251_bin AUTO_INCREMENT=1 ; |
SQL |
CREATE TABLE `pages` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `name` TEXT NOT NULL, `comment` TEXT NOT NULL, `add_by` TEXT NOT NULL ) |
Цитата (Plantis @ 24.07.2009 - 15:24) |
CREATE TABLE `pages` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `name` TEXT NOT NULL, `comment` TEXT NOT NULL, `add_by` TEXT NOT NULL ) ; You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 |
PHP |
or die(mysql_query() . ' -> ' . $line); |
PHP |
01| include ('../globals.php'); |
PHP |
or die(mysql_error() . ' -> ' . $line); |
SQL |
CREATE TABLE `pages` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `name` TEXT NOT NULL, `comment` TEXT NOT NULL, `add_by` TEXT NOT NULL ) ; You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'add_by` TEXT NOT NULL )' at line 1 -> `add_by` TEXT NOT NULL ) ; |
PHP |
include ('../globals.php'); |
PHP |
include ('../globals.php'); |
PHP |
$filesizee = filesize($file_handle); |
PHP |
$line = fread($file_handle, filesize($file_handle)); |
PHP |
include ('../globals.php'); |
Цитата |
Для файлов прикольная функция тоже - file_get_contents($filename) - без всяких циклов вернет содержимое файла |