Skip to content

Instantly share code, notes, and snippets.

View dotku's full-sized avatar
🧐
I'm busy... I may be slow to respond.

Weijing Jay Lin dotku

🧐
I'm busy... I may be slow to respond.
  • Meta
  • San Francisco, CA, USA
  • 21:37 (UTC -07:00)
View GitHub Profile
@dotku
dotku / 0_reuse_code.js
Created November 21, 2016 09:45
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

1. Public 目录

ThinkPHP5 借鉴了 Lavarel 的 Public 目录方式来存放"前端"的文件,这里的前端还包括了 PHP 路由,所以是不完全前端文件夹。总的意思是前后端比较明确的分离。

2. Controller 更加清爽了

#TP5
<?php
namespace app\index\controller;
[domain]
$8.99 https://www.namesilo.com/pricing.php
$8.99 https://www.onlydomains.com
$8.79 https://internetbs.net/
$10.69 https://www.namecheap.com/domains/registration.aspx

[webhosting]
$1 https://hostripples.com/
$0.5 http://www.hostblast.net/

Q: I can list files but file won't display anything in Apache2?

make sure there won't be any config override your config;

如果是一个空的文件夹的话,目录会是这样的

root@do-107-170-232-130:html $ cd empty/
root@do-107-170-232-130:empty $ ls -la
total 8
drwxr-xr-x 2 root root 4096 Nov  6 05:24 .
drwxr-xr-x 5 root root 4096 Nov  6 05:24 ..
root@do-107-170-232-130:empty $
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<title><?php echo C('SITE_TITLE'); ?></title>
<link href="/lib/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"/>
<script src="/lib/angular/angular.js"></script>
<script src="/lib/jquery/dist/jquery.min.js"></script>
<script src="/lib/bootstrap/dist/js/bootstrap.min.js"></script>
  1. where ampps domain manage read the config from?

It store on the path /Applications/AMPPS/ampps/data/domains

@dotku
dotku / ajax post
Last active August 23, 2016 23:52
http://stackoverflow.com/questions/6323338/jquery-ajax-posting-json-to-webservice
http://stackoverflow.com/questions/21201270/how-to-submit-json-data-by-request-body-in-jquery
$.ajax({
url : "/",
type: "POST",
data: JSON.stringify([
{id: 1, name: "Shahed"},
{id: 2, name: "Hossain"}

错误全开

This always works for me:

   ini_set('display_errors', 1);
   ini_set('display_startup_errors', 1);
   error_reporting(E_ALL);

However, this doesn't make PHP to show parse errors - the only way to show those errors is to modify your php.ini with this line:

  1. JUnit + 8
  2. Cactus + 3
  3. Abbot + 1
  4. JUnitPref + 1
  5. DbUnit +1
  6. Mockrunner + 1
  7. DBMonster + 1
  8. MockEJB + 1
  9. StrutsTestCase + 3
  10. JFCUnit + 3