-
Posts
15,229 -
Joined
-
Last visited
-
Days Won
427
Everything posted by requinix
-
LOOK UP Primary keys in a table and get the keys in assoc array
requinix replied to sribhaskar's topic in PHP Coding Help
...There is only one primary key in a table. You mean a composite key? A primary key with more than one column? -
You're contradicting yourself... In those cases you do only want immediate descendants. Unless you're talking only about what is visible to the user at a given time - are you constructing the entire menu hierarchy at once and showing/hiding trees as the user accesses the menu?
-
Create a Breadcrumbs Trail For a Website
requinix replied to BorysSokolov's topic in PHP Coding Help
It depends on how your site works. Your method for building $url_path is odd* but for all I know that's intentional. Though I will say you should have links for the crumbs if at all possible/sensible. * Normally you get breadcrumbs by looking at the structure associated with whatever page is being served. This may or may not be reflected in the URL structure: phpfreaks here only shows "topic/277963-*" in the URL but there's actually a hierarchy of Forum > PHP Coding > PHP Coding Help > This thread. -
Create a Breadcrumbs Trail For a Website
requinix replied to BorysSokolov's topic in PHP Coding Help
Improve it how? More "dynamic" how? -
If it's still writing stuff to a file then the script has not hung: it just doesn't look like it's doing anything...
-
Have you checked your error log(s) yet?
-
I meant server logs, not Cake's logs.
-
Database connection failed: ... No such host is known.
requinix replied to kimsbutt's topic in PHP Coding Help
You only need the quotes when you define the constant. define("SERVER", "localhost");Afterward, no quotes. $connection = mysql_connect(SERVER, USER, PASS);Otherwise PHP thinks you have a regular string and will happily use those as the values. -
Couple things to take into account: - How often will you add new categories? Move or remove ones? - Do you only need all ancestors and all descendants? Will you ever need to know only immediate parents or immediate children?
-
Stop doing that. Use a join. It will work.
-
1. Probably Cake. 2. Some server setups will send 500s if there's an error with the PHP. Look at your error logs.
-
$links is the result of a query which retrieves the data. It is not the query that gets a total count. You can't use it to calculate $pages.
- 1 reply
-
- php
- pagination
-
(and 2 more)
Tagged with:
-
SELECT * title GROUP BY keyword ORDER BY idLook at that query. Does anything seem wrong about it? If not, take a step or two away from your monitor and look again.
-
Yes. Just for clarity, they're telling you that they've blocked outbound connections unless you ask for it and/or that's the reason your stuff is failing?
-
That's true. Only exception is an active (ie, non-passive) FTP connection. Blocking outbound ports is unusual. Are you sure that's the problem?
-
You can't have it in there. Period. Why do you think you want it?
-
how to php variable value assign as java script
requinix replied to noahwilson's topic in PHP Coding Help
Even safer is <script type="text/javascript"> var id = <?= json_encode($id) ?>; </script>(language=javascript has been deprecated for a long time) -
how to create a new folder same like dump folder using php
requinix replied to rashgang's topic in PHP Coding Help
Since the most obvious function copy() will not copy whole directories, make a recursive version. Then call it. -
html- post to php and get data in gzip deflated
requinix replied to abhivinay's topic in PHP Coding Help
No, it's not. You need to learn PHP before you try to write code for it. -
You say you dumped out $_FILES. What exactly did it contain? Of particular interest is the "error" value. [edit] And since you didn't post it, is the using the right enctype?
-
You have to write out an entire <script type="text/javascript"> document.write("<scr" + "ipt type='text/javascript' src='https://maps.googleapis.com/maps/api/js?key=" + GKey + "&sensor=false'><" + "/script>"); </script> <script type="text/javascript" src="gmap/util.js"></script> <script type="text/javascript" src="gmap/killerTornados.js"></script>
-
Both the file_get_contents() and cURL versions should work. If they're timing out then there's a problem accessing that URL. For example, are you sure you have the right hostname? And that it really is on port 8080? By the way, if you're just outputting it then a header() redirect may be appropriate (I don't know what "header redirect problems" are) or, if it has to be code, readfile.
-
Can't help but notice you're saving the thumbnail to $target_path and putting the metadata in $filename.