Hi,
On my website I store user pictures in a simple manner such as:
"image/user_1.jpg".
I don't want visitors to be able to view images on my server just by trying user_ids. (Ex: www.mydomain.com/images/user_2.jpg, www.mydomain.com/images/user_3.jpg, so on...)
So far I have three solutions in mind:
I tried using .htaccess to passwor...
Ok, I have an app as described in this post: http://stackoverflow.com/questions/1623105/good-database-structure-for-a-new-web-app
I've prepared a scenario to make my question as clear as possible:
Users table:
+----------+-----------------+
| user_id | email |
+----------+-----------------+
| user_1 | user1...
Is there any other use of the question mark ? in PHP other than being part as the Ternary Operator.
Just to take note: I know about how it works in regex and all that. I am talking about the PHP language itself, not regex or what. I know how it works in opening and closing tags.
I am more concerned about tokenizing a PHP script. Is the...
This is what im using to loop through an array of arrays.
$csvpre = explode("###", $data);
$i = 0;
$bgc = 0;
foreach ( $csvpre AS $key => $value){
$info = explode("%%", $value);
$i++;
if($i == "1"){
echo "<tr bgcolor=#efefef><td></td>";
foreach ( $info as $key => $value ){ echo "<td>$value</td>"; }
...
I'd like to compare the settings I have on 2 different servers. Both are shared hosting so I don't think I have enough access to do it any other way but programmatically with phpinfo. So now that I have the 2 outputs, I'd like to compare them without examining them manually. Is there an automated way for this?
Also, as a side but relate...
Hello,
I have trying to achieve like this. I have one page which is written with php. There will be one button, which i click that button, that page will be converted to imageformat or pdf. Which function can i use? Is there any built it ? Which one will be more easier ? Creating imageformat or pdf? Please kindly point me out. Thanks.
...
Hi all,
I have to insert the xml processing instruction into xml file without opening that file means i have to insert that through PHP.anyone please helpme.
...
im new into PHP. how to configure the PHP5.2.11, MYSQL with smarty?
I have installed mysql, PHP separately. How to configure mysql with PHP, PHP with smarty?
...
I have an array full of sub arrays.
I need to break apart the first array at a given line number, and then insert a new line, and then combine them all back into their original structure.
This is what im working with now
$csvpre = explode("###", $data);
$i = 0;
$bgc = 0;
foreach ( $csvpre AS $key => $value){
$info = explode(...
I have trying to solve the error : Fatal error: Cannot redeclare class
I have been looking everywhere and I can't find where the class was instantiated.
Is there anyway I can print debug info about the existing instance of that class.
...
I saw different binaries for php, like non thread or thread safe ? What does it mean this ? What is the difference between this packages ?
...
Hi,
I don't know much about this and was just curious because i had an idea :)
I know with my cPanel hosting i can pipe an email inbox to a script, but what i want to do is:
send to [email protected]
pipes to mail.php
mail.php reads the subject, and a .txt attachment
the contents of the subject and .txt attachment are stored in the database
...
I am writing custom code to create a blog. I need the archives page to list all the blog entries by month. I cannot come up with a way to do that.
I guess it should not be too tough as it is a common feature on all blogs.
The table structure is (postid, posttitle, publishdate, .....)
...
I have a Axis 1.4 (with Spring) web service client consuming a PHP web service (running on Apache). This works perfectly in the development environment, but in the production environment the code execution hangs somewhere in the Axis library directly after the client has received the SOAP response. I have identified with Wireshark that t...
I'm attempting to intercept and filter items out of a class set array, $this->_vars, in a stripped down version of Smarty (not my choice :| )
Here's what I've been attempting to use:
Class callback function
private function callback_check($var){
if(!in_array($var['link_id'], $this->returned_array['items'])) return false;
else return...
Hi all
I want to print 2 kind of documents on 2 different printers. I use "Always print silent" on firefox so the print window doesn't show up on every print. But now I want 2 different prints I can not use this option and I really don't want the print window to show up. Any idea how I can do this like changing the default printer using ...
I'm busy developing an application where users can search within multiple table, now I'm not sure if I'm doing it the correct way.
My sample code looks as follows
SELECT
s.name,
s.surname,
s.id_nr,
s.student_nr,
s.createdate,
s.enddate
FROM
Student AS s,
Student_Results AS sr
WHERE
sr.innovation =...
I need to find the corners in lat/lng of a ground overlay given in a kml-file either in php or javascript.
I.e. for a specific example I need to get from:
<LatLonBox>
<north>60.406505416667</north>
<south>60.400570555556</south>
<east>5.3351572222222</east>
<west>5.3190577777778</west>
<rotation>3.7088732260919</r...
Hello
I'm building a web application using PHP5.3 and Zend Framework 1.9.4.
i have an sql file that creates and populates the relevant tables.
is there a way to install this sql file using PHP or even some component of Zend Framework ?
for now i just search for the mysql client binary and install using it.
...
I was hoping someone can help me convert this piece of code from object form to procedural form.
So I can have a sense of what to do for when I try to convert the larger piece of code that is all in object form that this snippet came from.
I'm a brand new beginner.
$sql = "SELECT id, label, link_url, parent_id FROM dyn_menu ORDER BY ...