A Simple Blog Application Created Using HTML, CSS, PHP & MySQL.

Skip to content Dismiss alert {{ message }} / php-blog Public
  • Notifications You must be signed in to change notification settings
  • Fork 1
  • Star 2
  • Code
  • Issues
  • Pull requests
  • Actions
  • Projects
  • Security
  • Insights
Additional navigation options  mainBranchesTagsGo to fileCode

Folders and files

NameNameLast commit messageLast commit date

Latest commit

 

History

45 Commits
.vscode.vscode  
accountsaccounts  
adminadmin  
assetsassets  
carouselscarousels  
componentscomponents  
errorserrors  
logslogs  
newslettersnewsletters  
postsposts  
uploads/imagesuploads/images  
vendorvendor  
.gitignore.gitignore  
.htaccess.htaccess  
README.mdREADME.md  
composer.jsoncomposer.json  
composer.lockcomposer.lock  
db-setup.sqldb-setup.sql  
gulpfile.jsgulpfile.js  
index.phpindex.php  
package-lock.jsonpackage-lock.json  
package.jsonpackage.json  
schema.sqlschema.sql  
set-language.phpset-language.php  
View all files

Repository files navigation

  • README
Blog

Instructions to setup the database

create database php_blog; create user 'php_blog_user'@'localhost' identified by 'php_blog_password'; grant all privileges on php_blog.* to 'php_blog_user'@'localhost'; use php_blog; create table users ( id int not null auto_increment primary key, username varchar(25) not null unique, password varchar(100) not null, name varchar(200), role varchar(10) not null default 'editor', email varchar(200), reset_link_token varchar(200), exp_date datetime ); create table posts ( id int not null auto_increment primary key, user varchar(25) not null, title varchar(200) not null unique, description text, body text, created_at datetime default now(), updated_at timestamp not null default current_timestamp on update current_timestamp, foreign key (user) references users(username) ); create table carousels_categories ( id int not null auto_increment primary key, name varchar(100) not null unique ); create table carousels ( id int not null auto_increment primary key, category_id int not null, user varchar(25) not null, title varchar(200) not null unique, description text, created_at datetime default now(), updated_at timestamp not null default current_timestamp on update current_timestamp, foreign key (user) references users(username), foreign key (category_id) references carousels_categories(category_id) ); create table images ( id int not null auto_increment primary key, user varchar(25) not null, imgpath varchar(200) not null unique, caption varchar(250) not null, created_at datetime default now(), updated_at timestamp not null default current_timestamp on update current_timestamp, foreign key (user) references users(username) ); create table carousels_images ( carousel_id int, image_id int, foreign key (carousel_id) references carousels(id), foreign key (image_id) references images(id) ); insert into users(username, password, name, role, email) values('admin', md5('admin'), 'Administrator', 'admin', '[email protected]'); insert into users(username, password, name, role, email) values('vishal', md5('vishal'), 'Vishal Bandre', 'editor', '[email protected]'); insert into posts(user, title, description, body) values('admin', 'First Post', 'First Post Description', 'First Post Body'); insert into posts(user, title, description, body) values('vishal', 'Second Post', 'Second Post Description', 'Second Post Body'); insert into posts(user, title, description, body) values('vishal', 'Third Post', 'Third Post Description', 'Third Post Body');

Periodic jobs

Setting cron jobs with crontab > crontab -e # crontag content: # Output to file # */1 * * * * php -q /home/vish/dev/web/php/blog/newsletters/cron.php > /home/vish/dev/web/php/blog/logs/newsletters.txt # Run script with php command # Append to file #*/1 * * * * php -q /home/vish/dev/web/php/blog/newsletters/cron.php >> /home/vish/dev/web/php/blog/logs/newsletters.txt # Will give access to $_SERVER #*/1 * * * * curl -q http://blog/newsletters/cron.php >> /home/vish/dev/web/php/blog/logs/newsletters.txt # Check your cronjob activity with: > /var/log$ grep CRON /var/log/syslog e.g. vish@ubuntu:/var/log$ grep CRON /var/log/syslog

About

A simple blog application created using HTML, CSS, PHP & MySQL.

Topics

mysql css html php development web webdev webdevelopment

Resources

Readme

Uh oh!

There was an error while loading. Please reload this page.

Activity

Stars

2 stars

Watchers

1 watching

Forks

1 fork Report repository

Releases

No releases published

Packages

Uh oh!

There was an error while loading. Please reload this page.

Contributors

Uh oh!

There was an error while loading. Please reload this page.

Languages

  • CSS 41.7%
  • PHP 29.4%
  • JavaScript 26.8%
  • SCSS 2.1%
You can’t perform that action at this time.

Từ khóa » Blog Php Github