I am wondering how to make a download server more robust. For now, I have a server, on https, storing zip files, named with a random hash, indexed by my database. The directory containing does not permit listing (htaccess) to avoid manual download directly browsing the directory on the server. The Java app di…
Tag: php
Displaying BLOB image from Mysql database into dynamic div in html
I have a BLOB image that is stored when the user submits an advert form, they have the choice of uploading one image. The image is stored in the database with the other information. Every time my page loads it dynamically creates the advert divs and also fills in the matching information from my database into…
php try catch not working properly
I have code like this: and problem is that, when file_get_contents can not read url (may be site not responding or something like this..) my code writes error: failed to open stream: HTTP request failed! and execution goes direct to finally block bypass catch block without entering in it.. any ideas? Answer Y…
How do I get a list of all models in Laravel?
I would like to find a list of all models, database tables as a backup, in a Laravel project. I want to do this to build a dashboard that displays the way data in all of the models has changed over time, I.E. if there is a user model, how many users have been added or modified each day for
How to escape Twig like variables on JS
I need to escape some JS twig-like variables in a twig template, but I couldn’t find anything about how to do that. This variables are used in a js templating plugin that uses the same pattern as twig for variables which is causing the twig rendering to fail Unexpected token “punctuation” of…
Get intro image by ID from database (joomla)
I am trying to read the intro image from a joomla database. I have a list of products, that each need to show the intro image that matches the ID of the product. // content $content = “…
Wamp : You don’t have permission to access file.html on this server
I tried to create a virtualhost to access to my local website using wampserver, but i get a 403 Forbidden when i’m trying to access to the webpage : I put the following line in my browser : …
Class AppHttpControllersWelcomeController does not exist
I’m new in Laravel and I can’t understand why the controller doesn’t work. Can you help me? Thanks. This is the routes.php file: routes.php This is the WelcomeController controller: WelcomeController.php and this is the exception trowed: ReflectionException in Container.php line 737: Class A…
How to show PHP Duplicate Entry error message on current page
I am creating a signup form for a website I am developing. I am using PHP to insert the form into my database. I have the useremail set as a Unique Key in my database. When I type in an email that already exists in my database it brings me to a blank page with this error message: Duplicate entry
How to make your own mailing services like gmail or yahoo
I am a noob to php and databases. But I have an idea to perform mail operations on my own web server (i.e just by database operations), but I really don’t have any idea of how to send mail to external …