231 Posted Topics
Re: I'm sorry, but I didn't understand your first question. To print a string backwards, you can use two ways. First you print it directly the other way round: [CODE]MOV ECX,stringlength MOV EBX,ECX ;stringlength as well, but better performance; EBX: Vector printloop: DEC EBX ;let the vector move to the beginning … | |
Re: favicon.ico is not neccessary. The PHP-logs don't show an error but a warning. If you want to add you own icon, you just have to place it in you root-dir. | |
Re: first: you could try to access your databse directly (eg. mysql_connect("http://www.blah.com"); ). But that's in most cases restricted. so you better do it this way: write a simple php-routine and put it on the server where your database is running. Select all data you want to display on the other … | |
Re: [CODE]if its plain text you can use: $f=file("./blah.txt"); $c=0; for($x=0;$x<count($f);$x++){ if(strstr($needle,$f[$x]))$c++; }[/CODE] Sorting can be done with assosiative arrays and the command asort. | |
Re: use the MySQLAdmin-Tool (which is somehwere in you bin-dir). There you can add and remove users. | |
Re: of course you can. you write a normal login-script and if the password is incorrect you just save a timestamp and a variable in you DB or textfile that you increment each time a wrong login is done. Having more than 10 incorrect login attempts, you disable the account (again … | |
Re: for a good tut hav a look on php.net. It's the best documented site for php in the net. the form is done in html [code]<form method=post action="save.php"> Your name:<br> <input type=text name="name"><br><br> Your email:<br> <input type=text name="email">[/code] This code sends the data to save.php. In PHP you can get … | |
Re: hmm... not neccessarily. You can also split it up in two html-pages if you want. [code] <? if($set==true){ ?> <html> ... following page 1 <? }else{ ?> <html> ... following page 1 <?[/code] Or if you want to use the same layout: [code] <html> <body> Style, style, style <? if($set==true){ … | |
Re: how do you mean? you want to number each php-script you have? or do you have an output (like a forum, onlineshop etc) that you want to chunk up. 1) numbering you php-files: do it with en external text-file. write the name of the file and add a number: [CODE]index.php|1 … | |
Re: unlikely. you could try to connect your smtp-server with fsockopen [url]http://de.php.net/manual/en/function.fsockopen.php[/url] and then send emails via the smtp-protocoll (which isn't very complicated). But I guess if you sever has disallowed mail() it also has restricted fsockopen(). In worst-case you have to find yourself a new server. | |
Re: 1) finding out files on the server: [CODE] $dir=opendir("./thatswhatiwant/") readdir($dir) //"." readdir($dir) //".." do{ $file=$readdir($dir); echo $file."<br>"; }while($file!=""); [/CODE] or you save all files in a thumb. 2) Selecting and printing the stuff in a textbox is made in JS. Use something like textbox.value+="; "+selected.value or you use the html-list … | |
Re: do you use a database or file? when having a db: "UPDATE `profile` SET `hobbies`='coolstuff' WHERE `user`=".$user with a file you can do it the same way as createing it: $f=fopen("...","w"); fwrite("hobbies:coolstuff\n"); fclose($f); if you still have probs then post that little piece of code. | |
Re: PHP is very simple and that's the reason why it is so popular. So doing it step by step: 0) get a homeserver (Apache with PHP and MySQL - you can use Xammp). 1) Set up a database and save job number and the password together with the article (eg … | |
Hello everybody, I have a question about one of these scanners with automatic document input. I regulary have to make copies of documents, that are printed from both sides. I had a look on these douplex-scanner but they are very expensive and big. Now it wouldn't be a problem for … | |
Re: C is good for engeneering for two very simple reasons: 1) the code is very, very light (not every computer has 4Gig of RAM => microcontroller (between 512Bytes and 4KB)) 2) it can easily be ported to different CPU-architectures. Especially in engeneering most robots and machines their own CPU (think … | |
Re: i don't really understand what you are trying to do. maybe you mean that: you have an index.php file with an argument like "?act=news". Then you can include the news.php from the folder include or code or whatever. The access to that folder can be restricted with htaccess. So nobody … | |
Re: you cannot open a new window with php. you have to use JS. To open a new page in the same window use: header("Location: newpage.php"); If you want to open a popup and then refresh the page I'd prefer it to to it both in JS. first window.open("popup.php") [see manual … | |
Re: you want to convert you php script to word, exel or pdf? just open you text-processor paste you code and save it. | |
Re: I don't have a code on the fly. You basically do it as follows. You have a string with the execution (static or via user input). You go through the string to seperate the functions +,-,*,/ from values. Then you convert each number to binar numbers (a bit longer function, … | |
Re: I don't know how many turkish characters differ from the ISO-Standart, but if there aren't many, you could try to mask them like [u] for "ü" etc. You save then the masked code in SQL, fetch the data later and unmask it "[u]"=>"ü", etc. That might help, just is a … | |
Hi everyone, I'm now fiddling over a week to fix a problem on my linux-webserver. I have the following code: [CODE] ... $bool=mkdir(trim($semname), 0777, TRUE); //chmod(trim($semname),0777); $f2=fopen(trim($semname)."/index.php","w"); ... [/CODE] it works perfectly when working on my home server under windows but as soon as loaded up on my linux-webserver it … | |
Re: <?=$prod_id?> must be: <?echo $prod_id?> then check if $prod_id is set. maybe your php doesn't overtake variables automatically. Then try $prod_id=$_REQUEST["prod_id"]. | |
Re: maybe you look for: $HTTP_SERVER_VARS["REQUEST_URI"] you get something like "/home/user123/htdocs/myfolder/" than you can work the folder out with explode | |
Re: do you really save the data in textform in the db? => use explode to chunk the data and add them to a string. [CODE]$str=""; for($c=0;$c<$anz;$c++){ $tmp=explode("----",$mysqlrow); $str[0].=$tmp[0]; $str[1].=$tmp[1]; $str[2].=$tmp[2]; ... } echo $str[0]."<bR>"; echo $str[1]."<bR>"; [/CODE] should work - i haven't tested it ^^ | |
Re: what you could do is to open a connection to the other server with socket_connect() ([url]http://de2.php.net/manual/en/function.socket-connect.php)[/url]. You write a HTTP-Request, save the binaries on your server and unzip it with the zip-lib (have a look at PHP.net). It should also support password protected files. But you better try it out … | |
Re: you can realize that with the GD-Lib (look for it at php.net). With that you can create images and write with custom fonts on it. I'm not sure if ttf is supported, but there are a lot of fonts that are. You can look for one that is very similar … | |
Re: basically there are two ways of solving it. The first is the explode the data into chunks and then converting them. secondy, in my opinion the better and easier way: use the function date("prefered format",mktime(...)) first arguments is you format that you like. the secend argument created an unix-timestamp (look … | |
Re: eg. $res=mysql_query("..."); $f=fopen("db.html","w"); ...fetching data fwrite($f,"Data: ".$data."\n"); | |
Hello everybody, does anybody have some experiences with scanners or other imaging-hardware? I am now looking for several weeks for good introductions in this topic, but so far, I couldn't find anything useful apart from the EZTwain packet that costs money. Maybe you have a hint how to use the … | |
Hello everybody, I just signed up, 'cause I looked through the internet over days to find a solution for the BASIC function GetKey(). It simply returns the Scancode of a key pressed by the user or 0 by default (if no key was pressed). I found the well known BIOS … |
The End.