Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mbas-shortener
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mbas-shortener
Commits
89ecc548
Commit
89ecc548
authored
Jan 28, 2016
by
Vitalik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support php 5.2
parent
5725cd7e
Pipeline
#177
skipped
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
config.php.example
config.php.example
+1
-0
helper.php
helper.php
+1
-1
index.php
index.php
+2
-0
install.php
install.php
+4
-3
No files found.
config.php.example
View file @
89ecc548
<?php
return
array
(
'server'
=>
'localhost'
,
'database'
=>
'dibi'
,
'table'
=>
'links'
,
'username'
=>
'root'
,
...
...
helper.php
View file @
89ecc548
...
...
@@ -6,7 +6,7 @@ function connect_db()
{
global
$config
;
$link
=
mysql_connect
(
'localhost'
,
$config
[
'username'
],
$config
[
'password'
]);
$link
=
mysql_connect
(
$config
[
'server'
]
,
$config
[
'username'
],
$config
[
'password'
]);
if
(
!
$link
)
{
die
(
'Could not connect: '
.
mysql_error
());
...
...
index.php
View file @
89ecc548
<?php
if
(
!
defined
(
__DIR__
)
)
define
(
__DIR__
,
dirname
(
__FILE__
)
);
define
(
'PATH_BASE'
,
__DIR__
);
require_once
PATH_BASE
.
'/helper.php'
;
...
...
install.php
View file @
89ecc548
<?php
if
(
!
defined
(
__DIR__
)
)
define
(
__DIR__
,
dirname
(
__FILE__
)
);
if
(
!
file_exists
(
__DIR__
.
'/config.php'
))
{
die
(
"Copy `config.php.example` file to `config.php` file
\n
"
);
}
...
...
@@ -7,7 +9,7 @@ if (!file_exists(__DIR__ . '/config.php')) {
$config
=
require
__DIR__
.
'/config.php'
;
$link
=
mysql_connect
(
'localhost'
,
$config
[
'server'
]
,
$config
[
'username'
],
$config
[
'password'
]
);
...
...
@@ -43,4 +45,4 @@ if (mysql_query($sql, $link)) {
echo
"Error creating table: "
.
mysql_error
()
.
"
\n
"
;
}
mysql_close
(
$link
);
\ No newline at end of file
mysql_close
(
$link
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment