server

Upload multiple files to server with php not uploading to server all files

只愿长相守 提交于 2019-12-06 11:29:17
Hi at all i got a problem i got a form which uploads files and insert into mysql the mysql insert part is working but he only moves one file of the three to the server need please some help here is my code. The Upload Form: <form enctype="multipart/form-data" action="add-exposes.php" method="POST"> Expose Name: <input type="text" name="name"><br> Expose Beschreibung: <textarea style="width: 810px; height: 200px" name="expose_desc" class="textarea"></textarea><br> Expose Kategorie:<select name="expose_cat" size="3"> <?php mysql_connect("xxx.de.mysql", "xxxx", "xxx") or die(mysql_error()) ;

How to open Android activities based on role of user?

痞子三分冷 提交于 2019-12-06 09:51:02
I am creating an online based Android app in which there is a listview , which shows notifications from different types of users like ' student ', ' teacher '. When I click a list view item, it should check the role of the user, whether the user is registered as ' teacher ' or a ' student ' and it should open the activity screen based on their role. I'll use intents to open different activities. How do I check the role of the user from server? Well, I would like to provide my own answer. I actually used Shared Preferences . Its much simple and could globally use the values we put in it. Below

Laravel Vue js spa application

…衆ロ難τιáo~ 提交于 2019-12-06 09:04:30
1). i want to know why people use two servers to make a vuejs SPA with laravel. I think we can use the other way. Make a Route like this Route::get('{any}', function () { return view('index'); })->where('any' , ".*"); and let vue handle the page url.. why people are using 2 servers and then using laravel passport to authenticate when we dont need to do all this to make spa.. 2). Okay now suppose we have our spa readdy using 2 separate servers one for vue and one for laravel . Now i don't know how to set two servers on a single remove server.? how should i upload both vue and laravel

how can i bind socket to ipv6 address?

ぃ、小莉子 提交于 2019-12-06 08:25:53
I am trying to port ipv4 applications to ipv6 but I can't bind the socket to the ipv6 address. The problem is here: err=bind(listening, (sockaddr*)&hint, sizeof(hint)); The err should be 0 but in this code it returns -1. What is going wrong ? SOCKET listening = socket(AF_INET6, SOCK_STREAM, 0); if (listening == INVALID_SOCKET) { cerr << "Can't create a socket! Quitting" << endl; return; } int err; // Bind the ip address and port to a socket sockaddr_in6 hint; hint.sin6_family = AF_INET6; hint.sin6_flowinfo = 0; hint.sin6_port = htons(54000); hint.sin6_addr = in6addr_any; err=bind(listening,

WAMP server doesnt work, no listening sockets avalible, unable to open logs

末鹿安然 提交于 2019-12-06 06:03:23
问题 My WAMP server isn't working, when I hover over the orange W icon i get "1 of two services running". I did the right click on the icon, selected tools, selected test port 80 I got: ***** Test which uses port 80 ***** ===== Tested by command netstat filtered on port 80 ===== 'find' is not recognized as internal or external command, operable program or batch file. Port 80 is not associated with TCP protocol 'find' is not recognized as internal or external command, operable program or batch file

Offline private NPM repository

こ雲淡風輕ζ 提交于 2019-12-06 04:43:14
问题 I read about building private NPM mirrors/repositories, but didn't quite understand. My goal is to make a repository that currently up to date, that contains all NPM packages available at the NPM website (The free packages) that I need. After downloading all packages I need to move it to a private network which is not connected to the internet. And set up a repository that will accept NPM requests in that private network. every month I will update the packages I have outside the private

How to connect to a target server via SSH with a key from a GitLab pipeline?

安稳与你 提交于 2019-12-06 03:49:42
问题 I want to connect to a server via SSH with a public key when GitLab pipeline succeeds. As I see, I need to generate a key with ssh-keygen on GitLab side and add it to server where I want to connect. I can generate a key during the pipeline but as the public key is not added to the target server, it makes no sense. I suppose it's a common scenario to connect from a CI build to a remote SSH with a key. How can I make it work? 回答1: You can run ssh-keygen from wherever you want as long as you use

how to deploy vue app in the shared hosting environment?

和自甴很熟 提交于 2019-12-06 03:47:09
问题 I would like to deploy my vue application on shared hosting server. How should I do it? Its a bit confusing as of now. Will I need express js for it or I can directly upload it like the normal html site? 回答1: Here's how I deployed mine. Goto to your project folder -> config -> index.js file ensure that the assetsPublicPath: is pointed to the public_html path of your shared hosting account. Run the " npm run build " command. Go to your project folder copy the contents of the dist folder paste

How to use the optional hostname parameter in Node.js server.listen()

旧时模样 提交于 2019-12-06 03:35:36
问题 From what I've read in tutorials so far, the optional hostname parameter to server.listen(port[, hostname][, backlog][, callback]) has always been either 127.0.0.1 (loopback), 0.0.0.0 (listen on every available network interface, the default option), or one of the actual IP addresses available to the server. Everything else will give an Error: listen EADDRNOTAVAIL . Is that the whole picture? (I believe hostname is technically different from IP...) I wasn't able to find out too much about it

Java: how to stop a server (close a Socket) without an exception?

强颜欢笑 提交于 2019-12-06 03:01:36
I've made a server which allows to join many clients. However I have a problem. I added START/STOP button which should start/stop server. But the code does not work like I want: connection isn't closed and code goes to the IOException "THIS IS PROBLEM" (in ServerLogic part). Additionally clients still can contact with server. SERVER LOGIC public class ServerLogic { private static ServerSocket m_sSocket; private static Set<ServerSubscriber> m_subscriberList = new HashSet<ServerSubscriber>(); private static boolean m_isServerRun = false; private static class ServerLogicHolder { static final