Questions tagged as 'php'

1
answer

How to secure a service site before launch?

I have no experience with this and am about to launch a service site and wonder if what I have to do to protect my idea is her patent, software registration or trademark registration? These are the options that appear in the National Institute o...
asked by 01.10.2015 / 05:26
2
answers

Store var_dump in a variable

I need to show the array and store it in a variable, the functions I know that do this are var_dump and print_r , but they do not store in string , they already give echo . What function to use?     
asked by 25.12.2014 / 17:02
1
answer

How to open file in MS-Office with Javascript or PHP?

I have a website that works only on a local network, where I have several files stored on the web application server, and I'd like to somehow use PHP or Javascript to open it directly with MS-Office, from the client side. In this way I could...
asked by 25.05.2014 / 22:47
1
answer

Am I connecting the bank with PDO in the correct way?

There are several ways to connect to the database, but I have opted for PDO. Am I doing it right? date_default_timezone_set('America/Sao_Paulo'); $pdo = new PDO('mysql:host=127.0.0.1;dbname=experiments','root'); if ($pdo) { echo "Banco d...
asked by 17.07.2014 / 02:34
2
answers

Check if a sequence of numbers corresponds to a valid timestamp

I need to check if a string matches a valid timestamp. Using is_numeric , ctype_digit , will only validate if it is numeric ... I want to know if the timestamp matches a date.     
asked by 27.07.2014 / 05:15
2
answers

What is the difference between using variable and passing direct parameter?

I wanted to know the real difference and between $sql = 'select * from tbl_blablabla'; $result = $connect->prepare(sql); and $result = $connect->prepare('select * from tbl_blabla'); Not only in this specific case, but several oth...
asked by 08.05.2018 / 21:41
3
answers

How to send a HREF with POST method or disguise?

I would like from my href, it went to the "spincoin.php" page with the post method, sending the variable "1", how can I do that? Code: <div> <a href="spincoin.php"> <h2>Product</h2> <p>Cost:...
asked by 13.05.2017 / 01:00
1
answer

Scheduled Tasks in PHP

I have a database with information about books and loans from them, when the time that the book can be borrowed then the system should change the status of the loan record. I thought of doing this as a scheduled task, is there any way I can acco...
asked by 16.05.2017 / 20:36
1
answer

Pick up the last explode position

I need to get the last position after giving explode . How do I? $geturl = explode('/', $_SERVER['REQUEST_URI']); self::$modulo = isset($geturl[2]) ? $geturl[2] : ''; self::$funcao = isset($geturl[3]) ? $geturl[3] : ''; self::$chave...
asked by 02.05.2017 / 21:52
2
answers

How to upload and configure a project with Laravel on the server

I'm starting with Laravel 5.3 and learning how to explore all of its features. But I have a question. How would my project look on the server (in production). Today my projects are inside a folder with the index.php file in the root. What woul...
asked by 28.07.2017 / 16:17