I have read the following tutorial "Uploading Files To the Server Using PHP" and have several questions related to the topics.
Q1> öğretici bahseder
"Note that PHP must have write access to $uploadDir or else the upload will fail"
For me, I only allow the user to upload the file after the user has login to the website. If we set that $uploadDir permission as 777, then everyone can have written permission to that folder. How to avoid this problems?
Ayrıca benim test yatağı olarak WAMP kullanıyorum, ben gerçek bir web sunucusu olarak aynı davayı taklit edebilir?
Q2> doğrudan erişim engelleme engellemek amacıyla, öğretici bahseder:
"A better approach is to move the upload directory away from your web root. For example, the web root for this site is: /home/arman198/public_html/ to prevent direct listing i can set the upload directory to /home/arman198/upload/."
Şimdi benim sorunum nasıl diğer web sitesi sayfalarında yüklenen görüntüleri olabilir. Yana, yükleme doğrudan artık erişilebilir değil mi? Ben yüklenen görüntü diğer web sayfasında dinamik kişisel headshot kurtarmak görüntülemek gerekir. Bu mümkün mü?
Teşekkür ederim