-
Posts
1,041 -
Joined
-
Last visited
-
Days Won
17
Everything posted by gw1500se
-
readfile
-
Are you asking how to create a table within a cell of an outer table?
-
Este é um fórum de língua inglesa.
- 1 reply
-
- 1
-
-
If I understand correctly, you loop on the outer sorted array. The within that loop you sort each inner array and loop on that to output the table.
-
You can't just copy and paste code you find on the internet. You need to understand what the code does and how to adapt it to your environment. As a help forum you need to post your code here (using the code icon (<>) in the top menu specifying PHP or HTML as appropriate) along with any error messages and/or what output you expect that is different from what you actually get. The first place to start is to make sure your httpd is running properly. What files are currently in your DocRoot?
-
Place your credentials in a file outside of DocRoot and read that file from the PHP connection script. Make sure you set permissions so only the user running httpd (usually 'apache' on Linux) can access that file.
-
Yes. Specify an absolute path (i.e. use a leading '/' in the path name).
-
It doesn't unless you tell it. There are two ways to specify a file location, absolute and relative. If the path starts with a '/' then the path is absolute, otherwise it is relative to the document root. If just the filename is specified then it expects it to be in the document root. If you want it to look "down" then specify the directory without a leadlng '/'.
-
Not sure what is not working since you don't say what error you are getting. .htaccess is managed by httpd and has nothing to do with PHP or "bringing it in." It appears to me like 2 different problems. Let's start with problem one. What URL do you want to rewrite and what do you want the rewritten URL to be?
-
I am getting the impression you don't have a database and are not using user logins at all. That being the case there is no good way to accomplish what I think you are asking.
-
Sessions are always hidden (from the user's perspective) so I'm not sure what you are asking. Also, the time a session exists is limited unless you specifically change it. It seems to me the most secure way to handle this is to store the viewed image names in your user database with each user name. The check to see if the user has already viewed it. You just have to be careful about how you handle interrupted image uploads.
-
Like I said, you can limit the upload size with the php.ini parameter or use requinix suggestion. However, a malicious user could change that parameter in the HTML page.
-
You can't know that from PHP (server side) directly. You can use Javascript/Ajax (client side) to send the file size back to PHP. However, the question is why do you care about the file size before upload? If you want to prevent files over a certain size from being uploaded you can set that with 'upload_max_filesize' in php.ini. The default is 2M.
-
After you json_decode without the true do the following: echo "<pre>"; print_r($result); echo "</pre>"; That will show you the resulting associative array so you can see how to reference the elements by key.
-
If it is running as 'daemon', then that is the user you need to set permissions for.
-
No it can't. Add that code to the PHP file giving you the error then run that code as a user normally would from a web browser. In the case of Linux, the user will normally be 'apache'.
-
First your code is very difficult to read. Edit the post and use the code icon (<>) at the top of the menu and specify PHP or HTML as appropriate. Then post the error message you are getting making sure you have error reporting turned on. error_reporting(E_APLL); If no error then explain what you are getting that is different than what you expect.
-
What is the URL returning? If it is returning JSON then you need to decode it which results in an array. If so you want to array_merge.
-
SSH keys go in the home directory by default. You can change that in /etc/ssh/sshd_config by modifying the AuthorizedKeysFile directive to point where ever you want.
-
php Mail Contact Form - File Attachment - Not sending file
gw1500se replied to cocolembo's topic in PHP Coding Help
How can we help you if you don't post the errant code? The link I gave you has examples to do what you want. -
php Mail Contact Form - File Attachment - Not sending file
gw1500se replied to cocolembo's topic in PHP Coding Help
Where do you "addAttachement" and reference the uploaded file? I think you did not post your complete code. -
Why am I not getting the number of expected result through the loop?
gw1500se replied to Abel1416's topic in PHP Coding Help
Its possible your loop itself is failing after the first pass. Make sure you have error reporting on: error_reporting(E_ALL); -
Which field is missing and post the code where you think it is being displayed? Also make sure you have error reporting turned on. error_reporting(E_ALL);