首页 Soft PlugIn RAN乱 Dev开发 Info资料 English WAP 留言 登陆 注册
-
Posted by Yippee | 评论(0) | 引用(0) | 阅读1356次
iwas21-真正的原版IWAS

做的半死,原来原版本的结构就已经不错了,晕倒。

 else if($action=="article"){
    userror($login_sess[group],"2");
   array_pop($sortarr);
      require"doc/art_add_form.html";
    }
    //小类删除
    else if($action=="sort_del"){
            require"action/delsort.php";
    }
    //以下是文章添加动作
    else if($action=="article_add"){
          require"action/addart.php";
    }

这样全部是再调用子PHP文件,这样看上去也舒服一点,偏偏我下载的那个版本是全部集成在INDEX.PHP里面。这个原版本还找到了使用说明,也说明了MKDIR的问题。 www.shengfang.org

http://www.shengfang.org/blog/p/iwas16fopenmkdir.php

3,如果空间是unix或linux系统,有safemode作用时,则程序每新建一个文件夹,就要根据提示删除生成的文件夹        再在相同的地方新建一个相同的文件夹,将其属性设置为777,切记. www.shengfang.org

不知道这里有没有人在safemode下使用phpwind的生成HTM功能。 请管理员和有这方面经验的朋友讲一下。

估计这个人也是遇到同样的问题了。

PHP 的安全模式是为了试图解决共享服务器(shared-server)安全问题而设立的。在结构上,试图在 PHP 层上解决这个问题是不合理的,但修改 WEB 服务器层和操作系统层显得非常不现实。因此许多人,特别是 ISP,目前使用安全模式。  www.shengfang.org
I am writing a script that creates minisites from a form.

I have this script:-
PHP Code:
$templatename = "minitemplate.php" ;

$pathtotemplate = '../' . "$templatename" ;

$mkdir = '../' . $_POST['suburl'] ;

$newtemplatename = $mkdir . "/template.php" ;

mkdir($mkdir, 0777) ;  www.shengfang.org

fopen($newtemplatename, "x") ;

and it generates this error:-
Code:
Warning: SAFE MODE Restriction in effect. The script whose uid is 804 is not allowed to access /home/virtual/site138/fst/var/www/minisites/myband owned by uid 48 in /home/virtual/site138/fst/var/www/minisites/join/addband.php on line 17

Warning: fopen("../myband/template.php", "x") - No such file or directory in /home/virtual/site138/fst/var/www/minisites/join/addband.php on line 17As I am creating the directory with chmod of 777 it shouldn't be generating these errors- what could I do to to make this work? Maybe there's some workaround or function I missed? Or is there a way to create a file using ftp or something (I logged in to the ftp server higher up in the script)

Any help would be frabjulous, www.shengfang.org
xox

Hello,

Ok, your original problem, as you figured out, is that SafeMode is enabled (yuck, don't know why hosts find it nessecary to enable it  ). Anyways, you found your way around that, I believe.

Make sure that when your using FTP to create a folder, or edit files, that you move to the correct directory first. IE, say you login in your root folder, you need to navigate to public_html and then, say, /subsites/. Here is what you would do (minus the connection code):

PHP Code: www.shengfang.org
ftp_chdir($ftpconnection, "public_html");
ftp_chdir($ftpconnection, "subsites");
ftp_mkdir($ftpconnection, $suburl);


Now I'm only about 90% sure that this will work under safe mode, but should it work, a new folder would be created: http://domain/subsites/<SUBURL>. My best suggestion to you, is that you request your host to disable safemode. It will make your life sooo much easier 

I hope this helps, and that this code is correct. Good luck and happy coding 

Cheers, www.shengfang.org


字体:

Permanant URI永久地址 http://www.shengfang.org/blog/p/iwas21true.php
Trackback URI引用地址 http://www.shengfang.org/blog/tb.php?tb_id=1126360915

2005年9月10日22:01星期六  [Dev开发] 追踪此文的RSS
提示:
此文还没有评论。

称呼:    登陆   注册
   不注册,但记住我的信息
邮件:
(非必须)
评论: [UBB代码帮助]
粗体 斜体 下划线 链接 水平线 引用



验证码: 请输入你看见的数字
关闭UBB      提交时自动将内容复制到剪贴板

公告
Fire and Motion!

统计信息
[Yippee]||[统计]||日志:1858
在线: 11||用户: 2577 [列表]
今日:396||到访:2886460
Rss:897736||评论:1605

最新日志

最新评论

友情链接

日历
2008 - 08
     12
3456789
10111213141516
17181920212223
24252627282930
31      

最新引用

搜索

归档

杂项
Get RSS Feed (Version 2.0)
Get Atom Feed (Version 0.3)
编码:  UTF-8