PC Nerd
Members-
Posts
1,122 -
Joined
-
Last visited
Never
Everything posted by PC Nerd
-
case sensative files and directories: windows/linux conversion?
PC Nerd replied to PC Nerd's topic in PHP Coding Help
I have Linux dual booted, however im doing thei project on windows..... im only dual booting to get the feel of linux, learn it etc..... Ill be migrating web development over eventually though. ( software developmet Ido is for windows, so i need a lot of my stuff on windows too ....). are there an apache modules or whatever that tell it to be case sensitive.? thanks -
case sensative files and directories: windows/linux conversion?
PC Nerd replied to PC Nerd's topic in PHP Coding Help
I intend on building myself a series of naming conventions ( camel case etc)... however it would be nice to have my server correct me and yell errors at me if i dont... ( i know,.. seems weird doesnt it)... any other suggestions? -
no error displayed, but refusing to asign value ot variable???
PC Nerd replied to PC Nerd's topic in PHP Coding Help
thats jus tmy current working model..... see the echo line doesnt display anything....., and when i have swapped around the #'s, it still doesnt assign... any suggestioins? Thanks -
hi #$now = time(); $date_str = $ROW['Date']; #$date = date("M/D/Y", $date_Str); echo $date_str."<br>"; #$test = strtotime($ROW['A_Time']." ".date("M", $date_str)." ".date("d", $date_str)." ".date("Y",$date_str)); #$test = echo strtotime($ROW['A_Time']." ".date("M/d/Y", $date_str)); #echo $test."<br>"; ok....so apart form the messiness, and the clear lack of thought behidn this........ $test refuses to be assigned to. as you can see ive tried echoing the output of the function, and still nothing. I knwo that the variables used ($ROW['A_Time'] etc), are 100% there and working..... im displahyignthem rightafter this. can anyoen sugegst why the strtotime() function isnt working? Thanks
-
Im not sure about the conversion or scale here, but i beleive its better to ave a larger database of smaller fields ( because of indexing for earching etc)... instead of a ( one column/table) smaller one with a very long column ,that is being called every second or so in a forum like environment. besides, if i only want ot list those that havent been viewd by the specivif user... hten it would require me pulling every record out and searching it with PHP... ( or can i do somethign like in SQL: "WHERE field LIKE %Username%".... ( but then thats not scalable when writinga lot to it to remove usernames)??? thats an interesting solution there, and thanks, however personaly feel that that is trying to place a flat file setup into a databse field, and i fear it wouldnt work? what does everyone else think?
-
IVe checked out SMF.... and was rather confused by its layout. im currently goign through the source code to it to see how it does it.
-
save your query into a variable eg:$SQL, and then echo SQL and see what you get. then copy that outputed query into MySQL or phpmyadmin and check that your getting a result from it..... if you are then its not that statement.
-
hmmm, so im familiar with sockets ( im also a python programmer amoungst many other languages, and imworkign on a large sockets based app).... howevre how woudl i get the php to receive requests through the SVN ports etc, when the web host is only listening on port 80??? (is svn stil port 80?) so would i have a similar setup to: svn clients connect to <domain>.com/svn.php then svn.php receives requests, and "proxies" them through using sockets??? I havent a clue where to start on that one sorry - although it cetainly sounds like its got heaps of potential Thanks
-
*bump* any suggestions? Thanks
-
Regarding: php and mysql .......urgent please............
PC Nerd replied to raghavendra's topic in PHP Coding Help
Im not goign to code the entire thing for you here, however youll want somethign with the following flow: connect to mysql run query("SELECT Date FROM <TableName> WHERE <condition>") then fetch the data: mysql_fetch_assoc($QueryVar); then youll want to be displaying that using somethign like: date("Y/M/D", $QUERYARRAY['Date']); double check the Date function so you knwo what format you want to output to etc. Theres plenty of references on MySQL and PHP out there, just google: "PHP, querying mysql" or somethign to get the answer. * Most people here wont be coding the entire thing for you unless youve got somethign youve attempted etc. So look into that. * if its really that urgent and you cant code it then post in the freelancing section for such a feature. gdlk -
Hi, Im building myself a mini CMS sort of thing, and i wanted to add a feature where the system can tell you ( and sort by) posts that oyu have or have recently read - similar to this forum and many others where unread posts appear in bold or other distinctive formatting. Im just not 100% sure about how to build the Database/ php(theory) behind this. Im not looking for a direct code sample, just a pointer/push in the right dcirection. Im currently thinking that i would have to have a table called "read_Posts" or something ismilar, and in it woudl have the following feilds: Read_ID auto, int (unique identifier) Post_ID, int (reference to post) Date, timestamp (when was it read). User_ID, int (who read it) and then when reading a pst, I would have to search to see if there is a currently "read" record, and if there is rewrite the timestamp to now, otherwise i would create a new one. Then when sorting by posts, I would have to either combine tables in teh SQL query, or I would be able to simply post by ordering by read etc etc etc??? my only issue for this approach is that if there are 50 posts, and 50 users, thats already 250 rows that i could have potentially in my database.... so this table would become unmagagable soon. - so is this the only way or is there a more productive method? Thansk in advance, PC Nerd
-
Hi, I want ot setup a SV N repository for a project Im working on and Ive run into a few problems. Firstly, my host nly provides alocal access, sop I woudl have to provide my personal login details to the accoutn to all those who need access to the reopsitory. Secondly, I wan tot integrate it into the project management im building in the next few weeks. Is there a way that I can get PHP to provide files in a manner that will allow current SVN clients such as rapidSVN etc to connect to it and have accounts and stuff managed through MySQL database etc? Is any of this possible, or an im heading off onto a tangent and missing something? Thanks
-
keeping track which of the users are viewing a certain page
PC Nerd replied to inaba's topic in PHP Coding Help
if your looking for somethign similar to whats found here at php freaks - this is how I would go about it. at hte top of every page i woudl log when a user requests a page. eg - this topic, home page etc etc/ then when im trying to find out who is veiwing the page - you woudl loop through users online, on the current board, and then just check to see the most recent page request. if its the same page as the current one - then add it to an array and display that array or somthing similar. Alternative. every page request, add a record in a database for page requests. when a page is requested by a user, overwrite the users last requested page. then, on every page request, over write the time and page values. then all you have to do is search by page name, and order alpha or similar by the username. gdlk/. -
[SOLVED] Alternative to header("location:google.com");
PC Nerd replied to PC Nerd's topic in PHP Coding Help
ok, thanks -
[SOLVED] Alternative to header("location:google.com");
PC Nerd replied to PC Nerd's topic in PHP Coding Help
oh - yeha ive got all my own domain etc. My problem is that I want to have it displayed as the url for the googlepages site - however I dont want to have to relocate name servers or anything. is there a PHP alternative? - or is resetting the nameservers the only way? Thanks -
well wherever you want the id to be displayed: echo $_GET['id']; thats assuming that youve used profile.php?id=00000000009 or similar etc. gdlk
-
Hi, I currently want to forward my domain to a google pages site. However I want to have the googlepages viewed as though it is mydomain.com If i use the PHP header to relocate the user they end up seeing that it is <username>.googlepages.com Are there any alternatives to this - or do i have to stick with seeing the <username>.googlepages.com? Thanks
-
use the above condition and the print ( i use echo) in the following format: if(<condition>) { echo nums that are correct } else { echo empty td }
-
well, walkthrough: get intput of the values youll need test them in teh tax brackets or whatever ( if or switch statements) calculate the tax. validate if its a positive or negative number, in which case youll use another if statement to display the output. thats a rough outline that shoudl get you started
-
bump
-
Hi ive got python scripts which I want to execute when called from php. My problem is that I dont think my htaccess files are setting it up correctly. at the moment I dont know what htaccess settings I need to setup to make these scripts work. when I view them in my browser, I see the source code, and when executed from PHP, they return no error, but give no output ( file writing programs dont write to the files). Ive been working with AllowOverride All AddHandler python-program .py PythonDebug PythonHandler test.py sort of stuff, but im jsut getting 500 internal error's. Can anyone suggest a way to get python scripts executing using htaccess? thanks
-
ok..... ive been playign with system, and exec and all that - and i cant seem to get it working: <?php exec("myprogram.py"); echo "<br><br><br><br>"; echo "Script executed"; ?> [\CODE] the php doesnt return any errors that cannot find file to run to run or anything - however the myprogram.py is meant to write a file, and its not working at all - its still a completely blank file ( it works when i run in on my ocmpuer not web based) Thanks???
-
ok. Ive read through that. is it possible to run it directly like a program, instead of rely on importing python into php. i noticed the ARGV or similar in that walkthrough - and i worked out how toget python to receive the arguments, so its just a case of running it. is there a function along the lines of: run(program.exe, args) where args is a dictionary of arguments or somethgin similar? Thanks for all your help.