我正在写PHP代码,其中我有函数,在这个函数中我有include,它工作得很好,但如果我在这个include文件中写新代码,我会得到错误
错误:
Notice: Undefined variable: text
功能:
function inc($templateinc){
if(file_exists(Fsys.Fview.$templateinc)){
include Fsys.Fview.$templateinc;
}
else {
include Fsys.Fview.'errors/404.php';
}
我使用pdf,我遇到了以下问题:当我写一个文本时,一切都很好,但当我想写一个动态文本时,比如"Hello X“,其中X是从数据库中获取的,它不起作用。我是说,我没有显示数据库里的名字。
我使用下面的代码编写它:
$ pdf-> Write (0, 'Faculty of Aerospace', '', 0, 'L', true, 0, false, false, 0);
$ paragraph. = '
<P>
I am writing this letter in support of <? Php if
我有一个代码('require_once‘部分并不重要):
<?php
require_once('../shared/database.php');
class Administration{
public $db;
public $base;
public function __construct(){
$this->db=new Database();
$this->base=new stdClass();
$this->base->url="http
我已经编写了一个PHP脚本,用于通过电子邮件和密码进行身份验证,因为电子邮件被标识为唯一的。
我想回显"true“以及echo ::fname (名字)。我该怎么写呢?以下是我的PHP代码。
include "db_config.php";
$email = $_POST['email'];
$password = $_POST['password'];
$sql = "select fname,e_mail,password from user where e_mail = '$email' and pwd