做的半死,原来原版本的结构就已经不错了,晕倒。 else if($action=="article"){ 这样全部是再调用子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 have this script:- $pathtotemplate = '../' . "$templatename" ; $mkdir = '../' . $_POST['suburl'] ; $newtemplatename = $mkdir . "/template.php" ; mkdir($mkdir, 0777) ; www.shengfang.org fopen($newtemplatename, "x") ; and it generates this error:- 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 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
I hope this helps, and that this code is correct. Good luck and happy coding Cheers, www.shengfang.org 字体:大 中 小 |
![]() | 永久地址 http://www.shengfang.org/blog/p/iwas21true.php |
![]() | 引用地址 http://www.shengfang.org/blog/tb.php?tb_id=1126360915 |
2005年9月10日22:01星期六 [Dev开发]





