-
Thinkphp time intercept into html how to write.
use the thinkphp3.2.3 framework, call the date style on the front page as shown below, how to write it in html? Can fall out, but the style can not show the effect of the following figure, do not want to add separate date parameters in the database. ...
-
Does thinkphp3.2 have a callback event after searching the database?
the desired effect is that all methods that manipulate the database in the project perform some custom actions after successful execution. frameworks such as laravel have corresponding solutions, such as throwing events. ...
-
Ask for advice on the verification code of PHP SMS
now that CAPTCHA is sent to the specified mobile phone number, the question now is how to verify the CAPTCHA and whether to store the result in the database. I use Ali big fish. I don t know if I can get the content sent.
after the user enters the CA...
-
I want to use php to make a Monty Hall question. How do you write the logic?
this is the java version of logic
import java.util.Random;
public class MengTeHuoEr {
public static void main(String[] args) {
boolean[] a = new boolean[3];
Random random = new Random();
int N...
-
How does thinkphp get the returned value?
A set of data is returned after simulated login using curl.
how do I get the st value under data?
$info = $this->curl_post_https( https: xxx Home logindo?fromSite=6 ,$cookie = tempnam( E: wwwroot tp5 public , cookie ),$data);
return $i...
-
Thinkphp3.2 defines database remote connection error in the model
Protected $autoCheckFields = false; virtual model static public $DB_goods = M ( goods , C ( DB_CONFIG6_PREFIX ), C ( DB_CONFIG6 )); this line reports an error: syntax error, unexpected ( , expecting , or ; what is the reason? ...
-
How does tp3.2.3 implement token authentication?
ask, how does tp3.2.3 implement token authentication? ...
-
There is no length attribute when thinkphp5 returns json?
function findChild(&$arr,$id){
$childs=array();
foreach ($arr as $k => $v){
if($v[ pid ]== $id){
$childs[]=$v;
}
}
return $childs;
}
function build_tree($rows,$root...
-
How does thinphp5 write session? in the entry file
because you want to create an additional administrative entry, it is convenient to change the name of the entry file.
app admin contrller Login
Login:
<?php
namespace app admin controller;
use think Controller;
class Login extends Control...
-
Php loop output form?
Array of loops
Array
(
[0] => Array
(
[field_id] => 368
[model] => customer
[is_main] => 0
[field] => age_group
[name] =>
[form_type] => box
...
-
An error is reported by the static method of the TP5.1 invocation model
<?php
namespace app index Model;
use think Model;
class User extends Model
{
public static function maxid(){
return $this->max( id );
}
}
use app index model User;
User::maxid();
then why did you report this wrong wh...
-
How to query data within the TP5 model?
how does a method such as inside the User model get the data? Is it wrong to write like this?
public static function getuid($value){
return $this->where( username ,$value)->find();
}
...
-
The tp3.2 setting forbids access to the Public directory
in the tp3.2 framework, I create a Public directory to store resource files at the same level in index.php. How can I prevent users from accessing my Public directory
...
-
Configuration of thinkphp template path
the template configuration file for a normal thinkphp is view_path = > template ,
recently discovered a content management system developed in thinkphp whose template configuration file path format is app home template .
the effect of au...
-
Does the model have to be instantiated when using the model in the TP5 controller?
for example, there is a getuid () method in the User model. For example, do I have to instantiate the User model first when I want to use the method in the controller? $user=new User () and then call this $user- > getuid () method? ...
-
TP5.1 routing packet Registration Middleware
my route turns out to be like Route::get ( he , admin index index2 )-> middleware ( Login ); can be accessed normally then cannot access routing packet middleware what s going on after being grouped according to this method?
Route::gro...
-
How do I use namespaces to introduce this class file in TP5?
The directory structure is what it looks like in the picture. Email.php and Index.php are in the same directory and the namespace is namespace app index controller ; IndexEmailnew Indexuse app index Controller Email;
...
-
Problems with TP framework namespaces and use
as shown in the figure Email.php and Index.php are both namespaces namespace app index controller in the same directory. I wonder if I want to introduce this class file by using Email.php in Index.php. Why is it wrong for me to introduce u...
-
Php Task Scheduler runs Times could not open input file
in order to facilitate automatic backup of the database, a bat is written to run regularly with the task scheduler
bat
ask the bosses how to do this
...
-
How phpstom debugs thinkphp projects
ask Daniel how to debug a thinkphp project with phpstom+xdebug,. At present, I cannot enter the breakpoint of the controrller layer. It is only valid at the breakpoint hit by the entry file. Ask the old apes for guidance. ...