سؤال في PHP ؟

أرسل من قبل BEN ADAM في السبت, 2007/12/01 - 12:37pm.
عضو فعال
صورة BEN ADAM

تاريخ التسجيل: 2006-12-10
مشاركات: 1391

السلام عليكم ورحمة الله وبركاته

كيف يمكنني تحميل ملفات(صور مثلا) وإنشاء مجلدات وأدله إلى السيرفر وذلك بوضع( safe mode=on حصرا) باستخدام تعليمات PHP ..
علما أن نسخة الـ PHP هي 4.3.1

 
دخول أو تسجيل لإرسال التعليقات | قراءة: 382

خيارات عرض التعليقات

اختر طريقتك المفضلة لعرض التعليقات و اضغط "حفظ الإعدادات" لتفعيل تغييراتك.
الأحد, 2007/12/02 - 12:07pm
عضو فعال
صورة BEN ADAM

تاريخ التسجيل: 2006-12-10
مشاركات: 1391

لا حياة لمن تنادي... !!!

 
دخول أو تسجيل لإرسال التعليقات
الأحد, 2007/12/02 - 2:44pm
صورة as_els

تاريخ التسجيل: 2005-02-20
مشاركات: 251

الجامعة: غير ذلك
الكلية: الهندسة المعلوماتية
المرحلة: ماجستير
الاختصاص: هندسة شبكات

uploading files will be something like this

$upload_path = uploads; 
if (isset($HTTP_POST_FILES[bulk-file][tmp_name]))
{   
    $file_path = $HTTP_POST_FILES[file][tmp_name];
    
    if (file_exists($file_path))
    {
        $file_name=basename($file_path);
        $upload_path = $upload_path . $file_name;
        move_uploaded_file($file_path, $upload_path))

    }
}

 
دخول أو تسجيل لإرسال التعليقات
الأحد, 2007/12/02 - 2:50pm
صورة as_els

تاريخ التسجيل: 2005-02-20
مشاركات: 251

الجامعة: غير ذلك
الكلية: الهندسة المعلوماتية
المرحلة: ماجستير
الاختصاص: هندسة شبكات

for making directories use mkdir command
BTW :(for admin) is there any changes in the site that limits the number of characters in the comments, cause it's giving an error (blank page) if the comments size exceeds a value

 
دخول أو تسجيل لإرسال التعليقات
الثلاثاء, 2007/12/04 - 4:56pm
عضو فعال
صورة BEN ADAM

تاريخ التسجيل: 2006-12-10
مشاركات: 1391

الله يعطيك العافية أخ as_els ما قصرت...

بس أنا بدي الكود يشتغل بوضعية safe mode=on ضروري...

إن شاء الله تكون فهمت قصدي...

 
دخول أو تسجيل لإرسال التعليقات
الأربعاء, 2007/12/05 - 12:28pm
عضو فعال
صورة iman

تاريخ التسجيل: 2006-12-01
مشاركات: 276

استخدم توابع ال FTP

كنت بتمنى فصل الاجابة اكثر ,,, بس ما في وقت والله .. 

How Perfect You are O Allah, and I praise You. LA Ilah Ila Lah, I seek Your forgiveness and turn to You in repentance

 
دخول أو تسجيل لإرسال التعليقات
الأربعاء, 2007/12/05 - 5:17pm
صورة as_els

تاريخ التسجيل: 2005-02-20
مشاركات: 251

الجامعة: غير ذلك
الكلية: الهندسة المعلوماتية
المرحلة: ماجستير
الاختصاص: هندسة شبكات

sorry I didn't notice before u mentioned safe mode
I think you have to use the .htaccess files to force your php scripts to run in "CGI Mode" because CGI doesn't have safe mode restrictions
you need to bypass safe mode restrictions because when safe mode is on the scripts which has a nonauthorized UID will not be allowed to run,
so create a directory in which you'll place your php scripts that you want to have run in CGI mode. then create a .htaccess file in that directory with the following contents:

        Action php-script /interpreters/php-script 
        AddHandler php-script .php AddHandler php-script .php3

now any php scripts you place in that directory will be executed by cgi-mode php.
OR nother solution
you can write your scripts in CGI. This is allowed because CGI scripts are executed in a much safer context than php.

كتب iman:

استخدم توابع ال FTP

كنت بتمنى فصل الاجابة اكثر ,,, بس ما في وقت والله ..

using the FTP functions will not solve the problem

 
دخول أو تسجيل لإرسال التعليقات