oni-kun
Members-
Posts
1,984 -
Joined
-
Last visited
-
Days Won
1
Everything posted by oni-kun
-
This is impossible if I think what you're asking is that. You can either use CSS to define the div manually, without defining it as a class. Or define it as a class. There's no way to hide it from the user.. save a bit of JS obfuscation or something crazy. But your intentions aren't so clearly shown, so I've not a clue.
-
Can someone explain what this tiny code snippet does?
oni-kun replied to hippypink's topic in PHP Coding Help
It uses ternary operators. But basically.. As far as I can see it echos a bit of HTML, which includes session variables. If they're logged in, then it displays the custom theme (note the absolute path). That code is messy and not really supposed to be done that way, PHP variables should be wrapped in HTML not echo'd and escaped so much like so. ? is a ternary operator. ; is a new line. -
It works! Must mean the W95 program I had, had absolutely no ties to DOS. Funny that.
-
You can use the GD library to generate a random map.. But It's going to be extremely hard to have it do anything on the map.. Your best bet is to use JS if that's what you're looking for, the generation/interaction is its advantage and strength.
-
-pulls out a dozen punchcards to design a php form-
-
NOPE! DOS is a new format of UNIX, ........ FOOL! I declare you are a 14 yearold, or have lost. Or both.
-
It's funny. CD, dir and copy work in Unix as well. Does that mean Unix is based on DOS? I didn't know Bill Gates was nice enough to help program Unix.
-
Read what above person said, And maybe that's a clue. If a PS2 compact disk is in an XBOX, does that make it a PS2?
-
I found .htaccess and vedit.bin on my system. Therefor, contrary to what the title of the operating system is, I believe it is Linux.. wait.. Linux IS unix. It's unix.
-
You'll need to use PHP's GD library to do this. You can create a picture predefined without text, and call it using imagecreatefromjpeg or similar functions, and add text it using one of GD's predefined functions such as ImageTTFText. Shouldn't be too hard from there.
-
The point I was trying to get at is that I doubt the OP is actually running DOS and that he should tell us what OS he actually is running. Create, Possibly. But view, he never said he needed apache, He could be running it off another server and just viewing it with DOS, there were virtual drives/server paths back then.
-
What are you talking about? Apache can run on DOS, maybe not without bugs but that was never the question I assume. He said VIEW PHP, if he somehow installed a proper legacy/modded distribution to run on dos I assume he would not have the problem viewing it in the first place. PHP files should parse just as 'html' files, there's nothing the browser has to parse except the text it is transmitted. @Chauffeur. Windows was a shell for DOS once, DOS is obsolete. Know your own facts.
-
You need to either add the footer insertion into the DIE code (lazy) or create your own custom function to stop execution. Really, you should not use die() unless it is an error. A 'try' loop may work more in your favour.
-
Yes, You'd use a Regular Expression ( REGEX ) pattern to find if a string contains certain characters. You can perform one like so: function CheckString($str) { if (preg_match('~[^a-zA-Z0-9\-_.]~', $str)) { echo "String is VALID;" //1 } else { echo "STRING CONTAINS INVALID CHARACTERS" //0 } } $txt = "A-Z-0_2_3_4_5"; $txt2 = "0-F-*-@-K"; CheckString($txt); CheckString($txt2);
-
Check the physical contents of the cookie and what domain it is valid in, then look to your CMS page where it sets the cookie/logs in and check if it is the PROPER DOMAIN or SUBDOMAIN. Remember, "site.com" is not ".site.com".
-
I'm not 100% sure but I believe PHP can only POST 8MBs of data at one time? I believe you'll need to use another form of uploading.. I'm sure there's many scripts out there, JS/AJAX. It's what AJAX is for (really).
-
Yes you do, but assuming you're using header you should use.. <?php ob_start(); //Fix for header session_start();
-
The ID of the form does not matter unless it's the one being submitted. You have to have "action=page.php", your parser or the own page and if you have a textarea for example.. <form action="form.php"> <textarea id="this"> </textarea> And then: </form> if (isset($_POST['this'])) { echo "$_POST['this']"; }
-
You could use a FOR loop for the 1-24 there, should be simple enough. Otherwise there's nothing you can really simplify.
-
He may be referrencing, albeit incorrectly.. $mailer =& new Email;
-
Need to add adsense to the results pages...Please help.
oni-kun replied to ineedhelp512's topic in PHP Coding Help
Adsense is JS and not PHP, therefor your unexpected 'T-whatever' is caused by you closing the code and reopening it. You may want to use HEREDOC such as.. <?php ... $adsense = <<<END //Adsense code here //All in normal HTML before end.. END; echo $adsense; ?> To work around any problems by splitting the code.. -
You will need to create sessions, if you already create a session when the user logs in than on.. file.php, you can write something such as.. if (!isset($_SESSION['username'])) { header('Location: http://www.example.com/login.php'); } else { echo "Welcome ".$_SESSION['username']."! Here is the file page."; } Simple, but you must make the HTML files .php if you want to use this code in each one..
-
Code? This is impossible. You can use the exec function to run a command such as 'java -f this.jar' to run the program itself, and display the console output to PHP, but you cannot run JAVA code.
-
What do you mean? You connect to the FTP server and you have to connect each page unless you use something such as AJAX.
-
There is no line 166, but from the error it's shown you've added the $ character unescaped somewhere in a string. Note you cannot use.. "$3 is the price" You have to use: "\$3 is your price." That is why it says unexpected '$'