我是新手Laravel,我正在关注Laravel Documentations以及一些教程视频.但是,我php artisan migrate在我的本地运行此代码,CMD prompt而不是Database Table在创建phpmyadmin.还有其他几个与此相关的类似主题,stackoverflow但没有解决我的问题.请不要标记此副本.
好的,就是这样.我运行这段代码
php artisan make:migration create_student_table --create=student
Run Code Online (Sandbox Code Playgroud)
并在迁移文件夹中创建新文件 2016_04_08_061507_create_student_table.php
然后在那个文件中我运行它 code
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateStudentTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('student', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->string('name', 20);
$table->string('email', 255);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{ …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用WAMP将google material-icons添加到我当前在localhost上的本地WordPress项目中.使用CDN,一切都很完美,但我想要一个静态的图标参考.
这是我的目录结构
/
-index.php
-css/
----style.min.css
----MaterialIcons-Regular.eot
----MaterialIcons-Regular.ttf
----MaterialIcons-Regular.woff
----MaterialIcons-Regular.woff2
Run Code Online (Sandbox Code Playgroud)
在style.min.css我有:
.material-icons{
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
font-size: 24px; /* Preferred icon size */
display: inline-block;
width: 1em;
height: 1em;
line-height: 1;
text-transform: none;
letter-spacing: normal;
word-wrap: normal;
white-space: nowrap;
direction: ltr;
/* Support for all WebKit browsers. */
-webkit-font-smoothing: antialiased;
/* Support for Safari and Chrome. */
text-rendering: optimizeLegibility;
/* Support for Firefox. */
-moz-osx-font-smoothing: grayscale;
/* Support for IE. */
font-feature-settings: …Run Code Online (Sandbox Code Playgroud) 我接管了该网站的维护,并且我只知道MySQL的基本命令。当WordPress更新到版本4.3.1时,此查询停止工作。直到那时为止,它工作了好几个月。
用户将信息输入表单,然后传递给MySQL数据库,这仍然有效。然后,从填写的表单中提取数据,然后通过电子邮件发送给公司。电子邮件通过,但字段为空。
'$query = "INSERT INTO ..._app (appid,$insert_keys) VALUES ('',$insert_values)";
mysql_query($query)
or die(mysql_error());
$app_query = mysql_query("SELECT MAX(appid) AS appid FROM ..._app")
or die(mysql_error());
$app_row = mysql_fetch_array($app_query);
extract($app_row);
$agent_msg = "...
\n
Application ID: $appid\n
Borrower Information\n
First Name: $fname\r
Middle: $mname\r
Last Name: $lname\r
Run Code Online (Sandbox Code Playgroud)
...等等。是的,我知道这是不推荐使用的MySQL,但客户端此时不愿意重写所有内容。似乎偶然的是,当WordPress更新时,它停止工作了。我不确定它是否可以在MySQL中修复code。
我试图从我的自定义帖子类型中限制我的帖子,但它显示了所有帖子。我想将帖子限制为 3。我已经尝试了Stackoverflow 中所有可能的解决方案
这是代码:
<?php global $post;
wp_reset_query();
$args = array(
'posts_per_page' => 3,
'post_type' => 'services',
'orderby' => 'date',
'order' => 'DESC',
'update_post_term_cache' => false,
'update_post_meta_cache' => false,
'nopaging' => true,
);
$the_query = new WP_Query( $args ); ?>
Run Code Online (Sandbox Code Playgroud)
我在这里错过了什么吗?
任何建议将不胜感激!