Home  >  Article  >  Backend Development  >  DEDECMS调用common.inc.php无效改了权限仍是无法调用

DEDECMS调用common.inc.php无效改了权限仍是无法调用

WBOY
WBOYOriginal
2016-06-13 12:58:14909browse

DEDECMS调用common.inc.php无效改了权限还是无法调用
/* require_once("../include/common.inc.php"); */
 $link=mysql_connect("localhost","root","");
mysql_query("set names 'gbk'");  
mysql_select_db("newnk"); 
$zx=$_POST['zx'];
$zx1=$_POST['zx1'];....
我新建了一个名为ggj的文件夹再里面写了一个add.php的文件下面的方法可以连接数据库而
/* require_once("../include/common.inc.php"); */无法调用了求大神指点
------解决方案--------------------
亲爱的同学,你为什么又要另外自己写呢?
假如你文件是如下建立的:
文件:/ggj/add.php

<br />
<?php<br />
include '../include/common.inc.php';<br />
$rs2 = $dsql->GetOne('s',"SELECT NOW()");<br />
print_r($rs);<br />
<br />
<br />
$dsql->ExecuteNoneQuery2("USE newnk");<br />
print_r($dsql->GetOne("SELECT DATABASE();"));<br />


$dsql,自带的。

------解决方案--------------------
D:/wamp/www/include/ 是文件夹,common.inc.php 在里面
那么你的程序文件在哪里?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn