当前位置: 首页>>代码示例>>PHP>>正文


PHP functions::file_permission方法代码示例

本文整理汇总了PHP中functions::file_permission方法的典型用法代码示例。如果您正苦于以下问题:PHP functions::file_permission方法的具体用法?PHP functions::file_permission怎么用?PHP functions::file_permission使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在functions的用法示例。


在下文中一共展示了functions::file_permission方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: functions

<?php

include_once "functions.inc.php";
$functions = new functions();
if (isset($ad_password)) {
    $ad_password = $_POST['ad_password'];
}
$installed_file = @fopen("../upload/siteInformations/installed.info.txt", "r");
$installed_pass = @fread($installed_file, 1000);
@fclose($installed_file);
if ($functions->reinstallCheck() == FALSE && ($functions->file_permission("../include/") == FALSE || $functions->file_permission("../upload/sessionCookies/") == FALSE || $functions->file_permission("../upload/siteInformations/") == FALSE || $functions->file_permission("../upload/smartEditor/") == FALSE)) {
    $functions->error_alert_location("1단계가 진행되지 않았습니다.", "index.php");
}
if ($functions->reinstallCheck() == TRUE && ($functions->file_permission("../include/path.info.php") == FALSE || $functions->file_permission("../include/mysql.info.php") == FALSE)) {
    $functions->error_alert_location("재설치인 경우 include/path.info.php, include/mysql.info.php 퍼미션이 707이상으로 설정 되어야 합니다.", "index.php");
}
if ($functions->reinstallCheck() == TRUE && getenv("REQUEST_METHOD") == "GET") {
    $functions->error_alert_location("정상적으로 접근 바랍니다.", "index.php");
}
if ($functions->reinstallCheck() == TRUE && $ad_password != $installed_pass) {
    $functions->error_alert_location("관리자 비밀번호가 일치하지 않습니다.", "index.php");
}
@unlink("../include/path.info.php");
$file = @fopen("../include/path.info.php", "w");
@fwrite($file, "<?php\n    define(\"__DIR_PATH__\",\"" . str_replace('install/' . basename(__FILE__), '', str_replace("\\", "/", realpath(__FILE__))) . "\");\n    define(\"__URL_PATH__\",\"" . str_replace('install/' . basename(__FILE__), '', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) . "\");\n?>");
@fclose($file);
@unlink("../include/engine.info.php");
$file = @fopen("../include/engine.inc.php", "w");
@fwrite($file, "<?php\n    header(\"Content-Type: text/html; charset=UTF-8\");\n    ini_set(\"display_errors\", 1);\n    ini_set(\"error_reporting\",\"E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE\");\n    include_once \"" . str_replace('install/' . basename(__FILE__), "", str_replace("\\", "/", realpath(__FILE__))) . "include/path.info.php\";\n    include_once __DIR_PATH__.\"include/session.info.php\";\n    include_once __DIR_PATH__.\"include/mysql.info.php\";\n    include_once __DIR_PATH__.\"include/mysql.class.php\";\n    include_once __DIR_PATH__.\"include/lib.class.php\";\n    include_once __DIR_PATH__.\"include/paging.class.php\";\n    include_once __DIR_PATH__.\"include/modeling.class.php\";\n    include_once __DIR_PATH__.\"include/mailSender.class.php\";\n    include_once __DIR_PATH__.\"include/fileUploader.class.php\";\n    include_once __DIR_PATH__.\"include/validator.class.php\";\n?>");
@fclose($file);
?>
开发者ID:devwit,项目名称:toonytool,代码行数:31,代码来源:step2.php

示例2: functions

<?php

include_once "functions.inc.php";
$functions = new functions();
if (getenv("REQUEST_METHOD") == "GET") {
    $functions->error_alert_location("정상적으로 접근 바랍니다.", "index.php");
}
@unlink("../include/mysql.info.php");
if ($functions->file_permission("../include/") == FALSE || $functions->file_permission("../upload/sessionCookies/") == FALSE || $functions->file_permission("../upload/siteInformations/") == FALSE || $functions->file_permission("../upload/smartEditor/") == FALSE) {
    $functions->error_alert_location("1단계가 진행되지 않았습니다.", "index.php");
}
if ($functions->file_check("../include/path.info.php") == FALSE) {
    $functions->error_alert_location("1단계가 진행되지 않았습니다.", "index.php");
}
$host = $_POST['host'];
$db = $_POST['db'];
$id = $_POST['id'];
$password = $_POST['password'];
$connect = @mysql_connect($host, $id, $password);
mysql_select_db($db, $connect);
if (mysql_query("select * from toony_member_list", $connect) && mysql_num_rows(mysql_query("select * from toony_member_list", $connect)) > 0) {
    $installedDB = TRUE;
    $insertAdminDB = TRUE;
} else {
    if (mysql_query("select * from toony_member_list", $connect) && mysql_num_rows(mysql_query("select * from toony_member_list", $connect)) < 1) {
        $installedDB = TRUE;
        $insertAdminDB = FALSE;
    } else {
        $installedDB = FALSE;
        $insertAdminDB = FALSE;
    }
开发者ID:devwit,项目名称:toonytool,代码行数:31,代码来源:step3.php

示例3:

if ($functions->reinstallCheck() == TRUE) {
    ?>
			<span class="stitle">
				재설치 모드인 경우 관리자 비밀번호 입력이 필요합니다.
			</span>
			<span style="display:block; text-align:center;">
				<input type="password" name="ad_password" style="width:96%; margin:10px 0;" />
			</span>
			<?php 
}
?>
		</div>
	</div>
</article>
<footer>
	<?php 
if ($functions->reinstallCheck() == FALSE && $functions->file_permission("../include/") == TRUE && $functions->file_permission("../capcha/") == TRUE && $functions->file_permission("../upload/sessionCookies/") == TRUE && $functions->file_permission("../upload/siteInformations/") == TRUE && $functions->file_permission("../upload/smartEditor/") == TRUE && $functions->php_versionCheck() == TRUE && $functions->module_check("gd") && $functions->module_check("mbstring") || $functions->reinstallCheck() == TRUE && $functions->file_permission("../include/path.info.php") == TRUE && $functions->file_permission("../include/mysql.info.php") == TRUE) {
    ?>
	<input type="submit" class="__button_submit" value="다음 단계로" />
	<?php 
} else {
    ?>
	<input type="button" class="__button_cancel" value="다시 검사하기" onClick="document.location.reload();" />
	<?php 
}
?>
</footer>
</form>
</body>
</html>
开发者ID:devwit,项目名称:toonytool,代码行数:30,代码来源:index.php


注:本文中的functions::file_permission方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。