I am currently fetching api from php database(Served locally in my pc) and sending get/post request from flutter mobile application using url = “http://10.0.2.2:8000/api/login” , here I used port number 10.0.2.2 because I am using virtual emulator and it works fine. My question is what should be m…
Tag: server
File uploading with php: problem with $_POST[‘filename’]
I want to upload files from my Android app to my php server (through a https upload URL) Here is my php code : The content of $_FILES[‘uploaded_file’] is: So everything seems ok as I get the name of my file and its correct size. But when I log $_POST[‘filename’], I get a null string. H…
Phpmyadmin menu items are not visible. What would be the reason?
I installed my Laravel application on digitalocean with LEMP stack. Afterwards, I followed the instructions for phpmyadmin installation, but when I log in to phpmyadmin, the menu elements disappear 2-3 seconds after the page is loaded and the panel does not work properly. I leave the sample image below. How c…
Serve file from cache folder if it exists, otherwise rewrite to “index.php” using .htaccess
Suppose in root directory I have one file (called index.php) and one folder (called caches). I want that if the file exist in caches folder serve that file (caches/xxx.html) otherwise request send to index.php. For example I will send request to server: https://example.com/how-to-do and Apache search first in…
Is there any way to get the id of “Android WebView” app?
I use this php code to check if the user open my website from a Webview or from a browser and i want to get the id of “Android App WebView” apk which is on the playstore but i don’t find it and i also want the id of “Google Chrome” apk. Id example: “com.facebook.orca”…
.htaccess file is not working in my Server
My site is located in https://itjmovies.com/milan/public/ and I want to rewrite the URL by .htaccess file. From https://itjmovies.com/milan/public/ To https://itjmovies.com/milan/ but it is not working. And also https://itjmovies.com/milan/public/auth/index.php?page=new To https://itjmovies.com/milan/public/a…
Prevent download of PDF file from site
I have files stored in the server with the Plesk panel, currently, any person with the link of my site can access the file and download it. Is there any way to prevent the download for all the users? Answer The general approach is to create a folder that is not in the root folder of the web site. In
I have an error in server session and can’t resolve it
when i click logout and page return to login again this line is be in display : logout page >>>>>> init page >>> Answer you must use session_regenerate_id() before of session_start(); for more information read this link: session_destroy
PHP not comparing “#”
I have a simple script where I enter some text on my search bar and PHP echo the first character from the text. My code: $data = strval($_GET[‘u’]); $ss = substr($data, 0,1); if ($ss == “@”)…
Make directory and upload multiple file into created directory PHP
I have been digging for an answer for many days. how do i upload multiple file to the newly created directory. If you look into file_upload.php you will find two $upload_dir variable. So, let’s call first $upload_dir as direct folder and Second, $upload_dir as make dir. Simple So, When I select first $u…