[PHP] backtracing of includes
Hy, I would like to know if there is a way to get information on the include hierarchy of files in php, especially to find out where which file is included and trace back the line from some file until the first called php file. My special case here and now is that I get an error that some function is already declared and cannot be declared again because of this. I know i must have included the file with that function somewhere already, but as i have lots of nested includes I have trouble right now to find the place where ist already happens. I know I can prevent those things in future by using things as require_once and so on, and i can search through all the code, making yself a map on paper to see which file includes what, but what i really want to know is, if i can ask some function to tell me where the function which makes the error stated above and from where the file is included, and from where this file again is include, going as far back until i have my first-called php file. I hope you can understand what i mean, henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] backtracing of includes
Hy, Am 28 Dec 2001 14:27:50 +0100 schrieb Jerry Verhoef (UGBI): > Don't think that a option like this exists. > > But maybe you should consider using > > include_once or > require_once > > Also before you define the function use the function_exist("") and if the > function already exists don't redecleare it. That's what I wrote - I know I can use things like that, but I am curious if there are other ways to find out which file is included by what and which function is defined in which file - i didn't find answers about that in the manual. Meanwhile I found out what the real problem was, namely that a function was declared inside a function, and the parent function was called twice, resulting in an error. I think it's generally not recommended to declare functions inside functions as I see no obvious reason now when this should be useful, only that it can make things complicated as i saw right now.(btw: this code does not come from myself, i am just making additions to it) So, I am still curious if and how one can trace function definitions and includes in a convenient way. henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php-gtk compile prob
Hy, this is for [EMAIL PROTECTED], there you'll get answers I think... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP dependent on connection speed?
Am 03 Jan 2002 08:10:08 -0600 schrieb charlesk : > Is the php engine slowed by users with a slow connection? it _should_ not under "normal" circumstances - but what problems are you exactly experiencing? henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Sending variables between PHP pages
Am 04 Jan 2002 12:49:41 +0100 schrieb Berlina: > Yes, Im thinking the same... > :-(( > > Thanks again Intruder > > > - Original Message - > From: "Intruder" <[EMAIL PROTECTED]> > To: "Berlina" <[EMAIL PROTECTED]>; "php-general-list" > <[EMAIL PROTECTED]>; "php-dev-list" <[EMAIL PROTECTED]>; > "php-db-list" <[EMAIL PROTECTED]> > Sent: Friday, January 04, 2002 12:38 PM > Subject: RE: [PHP] Sending variables between PHP pages > > > > >> Yes, thanks a lot, but i need to mantain the connection open for manage > a > > >> transaction, an everytime that I open a new database connection, > > >> the system > > >> begins a new transaction and I lose the last one. > > >> Do you understand, me? > > >> Do you know the way for do that? > > > > I think it is imposimble in web applications at all, because there is no > > persistent connection between db server > > and "web server + PHP" service. You can try for example mysql_pconnect() > > function (or it's analog for your db engine) > > but still I don't think it is possible ;((( > > Only applications can make this for you NOT PHP and Web ;((( I don't see the problem? What do you really want to do? Can't you go and use php sessions to save data generated in multiple pageviews of the web application, and when you finished all data collection from the user, at the last page you go and make your DB transaction to save all the data. If you worry that some data could be changed in the meantime you can even add a timestamp column in your database and check if it's still the same before doing something like, e.g. updating a database row on the last page. So i don't see why a transaction _must_ live over multiple pages and not only start on the last one when input is finished. Anyway, the last sentence is double wrong - you can make _real_ GUI application with php-gtk, see gtk.php.net, and then, i can think of web applications that _could_ do something like that, even if I don't know one that does it - sure you could create a server side, web based software that would let db connections and even transactions alive even after a request and sending out the answer is done(which is the way php, CGI Programs, and i suppose nearly all other Web based software works), save the state of db connections as session data and use the same database connection again with the next request, but i think that brings some problems. E.g. I could fire thousands of programs that stay alive on the server just by sending some http requests - that wouldn't be very nice for folks runnning the webservers. Writing more clearly what the purpose of all that is migth bring me another view of this all... greets, henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP Grammar
Am 04 Jan 2002 14:53:18 -0200 schrieb JJVG: > Hi, > > Is there a place where I can get the PHP Grammar? http://download.php.net/manual/en/langref.php have fun, henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Connecting PHP to a remote mysql database
Hy, Félix García Renedo wrote: > Hello, > How could I configure php to access to a remote mysql database? just use the correct hostname of your remote host in mysql_pconnect( "HOST", "USER", "PASS"); henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] counting with dates (help!)
Sander Peters wrote: > Hello, > > > This is my problem: > > $today = date("Ymd", mktime(0,0,0, date(m),date(d),date(Y))); > $last_week = date("Ymd", mktime(0,0,0, date(m),date(d)-7,date(Y))); > echo ($today - $last_week); > The result is a number like 8876 (20020107-20011231 = 8876) which is completely correct. with date as you use it up there you only generate numerical values in a format you specify, and then you substract those numericals from each other, echoing the rest of 8876 > But in date thinking it should be 7! I think if you want to get the number of days you have to 1) substract the mktime values you used in the date statement to get the difference in seconds 2) count how many days you have with this amount of seconds by dividing the seconds through 86400 date is a function to give you representations of a date and time at any given moment as expressed in unix time in a lot of different, configurable formats. after you generated a date representation with date, the program doesn't know anything at all about the date/time meanings of that string or number. hth henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Connecting PHP to a remote mysql database
Félix García Renedo wrote: > Sorry, > I have an mistake. > I want to configure php to connect to a remote mysql database and I want > the options to configure php. in configure it makes AFAIK no difference if you will be connecting to a local or remote mysql db. just use "--with-mysql" or "--with-mysql=/PATH/TO/MYSQL/LIBS" see also the output of ./configure --help for more information henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] really weird
Chris Grigor wrote: > Right now your in the picture this is okay to check if the mailbox is above > the size of 0. But what I really need help with is, say for instance I get 1 > message into the mailbox and the script runs, I only want it to run once for > that message, however if another message comes in I need it to notify me... > at the moment it runs every 10 mins and just keeps notifying me over & over. you have to keep state before exiting the script in a filke or a database and then look up that state in the next run. say you save something like path size /path/to/mailbox/hugo 15kb /path/to/mailbox/mary 56kb then you only send a message when the size of the mailbox changes again, not when number of files in it is more than 1 mabye you need to use things like modification time instead of size, i don't know right now which is better. You should _not_ use numbr of files, as when ypu save the state "1 file in mailbox" it could be that the user fetched on file menawhile and another file has come in - your program doesn't register a change but it has changed very well... HTH, henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] really weird
Chris Grigor wrote: > Hi Henning > > If I use modification time, how would I use keep state before exiting (I > have never done that aggghhh!) i didn't do that before, too, I just can imagine how it should work :) before exiting or right after sending the mail you would need to write the actual modification time of your directories or files into a database or file, like FIRSTFILE 2002-01-08 17:45 SECONDFILE 2001-01-08 16:32 got it? if not, what's the exact problem? Don't know how to write data to a file or databse? don't know how to get modification time? henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Redirecting to a URL
Hy Robert MacCombe wrote: > Hi, how do I redirect to a different URL, e.g. as a result of an IF > condition being true. I'm basically looking for a PHP version of the ASP - > Response.Redirect("/otherpage.htm") use the header function to send a location: header to the browser: $redirect_url="http://www.nowhere.net/";; if( $foobar=="" ){ header( "Location: ".$redirect_url ); } henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] binary data - MSSQL
Hy Peter, Peter Lavender wrote: > Hi Everyone, > > I did ask this earlier, but I have made some head way since, but I'm still > not sure that I have things right. > > What datatype should I use for zip files? You should use the blob type therefore > > How do I create a link to a file to be downloaded from the database? first you need a php script that pulls the data out of the database and echoes an appropriate header, and after this all the binary data of your file, you would then link it and give the id or whatever you use to identify it in the database as parameter to this script. > > All the examples I have read all relate to images, which hasn't really > helped. it's exactly the same with zips as with images, the only difference is the header for the mime type which is "image/gif" for gif's and "application/zip" for zips If you already know everything for images out oif a Mysql, then i don't tell it again here - ask if you still have problems! henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] echo "" problem NEW
Hy, universal2001 wrote: > Hi again! > > Thanks for the reply! > > I still have another question: > > so I tired to use (echo) like this: > > echo " > > border="0"> > > > src="img_heading/index_r1_c1.gif" width="639" height="5" border="0"> > border="0"> > > > src="img_heading/index_r2_c1.gif" width="25" height="43" border="0"> > "; > but it DOES NOT WORK. > How do I get way with all of the quotation marks 1) you can escape each double quote with a backslash, the first line of your thing woulkd then look like echo " and so on 2) if you don't want this by any reason, you can use single quotes to mark the text you want to print out like in echo ''; the difference is that with single quotes you will _not_ be able to use variable replacement in between the quotes, something like "; ?> will output while this: '; ?> will output exactly hth, henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] echo "" problem NEW
Nicolas Costes wrote: > Hellorghh !!! > You'd better do like this : > > echo " > just another one - but i am too out of practice with html standarts to know if this is compliant ( a browser showing a result doesn't neccessary mean it's standarts compliant!) henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HTTP_X_FORWARDED_FOR?
Hy, [EMAIL PROTECTED] wrote: > Hi, > > I just installed IIS 5.0 and PHP 4.1.1 on Win 2000, and I'm wondering what happened >to the HTTP_X_FORWARDED_FOR? I doesn't seem to exist on my system. Is it just a >variable that needs to be changed, or has it been removed from PHP? Thanks. This has something to do with the way you access the machine - x-forwarder-for contains the private ip address of your client machine when calling the php pages through a proxy. It has nothing to do with your php or server side configuration. henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] xml dom support
Sandeep Murphy wrote: > hi, > > I am running PHPtriad on a win2k machine... when I run phpinfo() it > displays " XMLACTIVE" this means that the standart, expat based xml support ist active >but I keep getting an error "Fatal error: Call to > undefined function: xmldoc() in C:\apache\htdocs\example.php on line 24" > > What needs to installed/configured ?? you need DOM XML support, i only don't know how to do this with win2k... see http://www.php.net/manual/en/ref.xml.php and http://www.php.net/manual/en/ref.domxml.php for more information about these two... henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Compiled PHP
Andrey Hristov wrote: > Several months ago there were notes on few websites about "phpcompiler". > AFAIK it is not so good but it is something. > Last week a man on php-dev said that he starts working on new php compiler but with different approach - to connect in one thing - > php4ts.dll, php.exe, and the source code untouched(no compiling on it). > It is interesting if one can make compiler for php to Java bytecode. I saw that there is a such compiler for Ada. But, as i understood the question, he ist looking for something that generates code which makes the php interpreter obsolete. I think something like this doesn't exist. There are several ways to generate bytecode, but this is still to be run with a special interpreter. There are several approaches, whereof some have the goal to make execution of code quicker and some others have the goal to give you possibility to distribute your software without giving away the code in readable form. I think there is an encoder from zend, too, to be found at www.zend.com my 2 cents henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] removing an array element
Erik Price wrote: > what function is used to remove an array element from an array? Like > array_pop(), except one by which I can refer to the element by its > associative index rather than just the last element of the array. > > > For more detail with what I'm doing, I have two versions of a > listbox -- one that includes an with selected="yes" (if the > user is calling this page from submitting a form). The other version is > for users who are NOT calling this page from submitting a form, i.e. for > the first time. > > I would like, in the first version (if ($formfilled)), to REMOVE the > element $temprow['div_name'] from the array $temprow so that it doesn't > appear a second time (in the WHILE loop), since it has already been > echoed above the WHILE loop. > > Is this even possible? I would do it another way. say you have all the possible choices in an array that come out of a database, and ypou want, if the user already selected one, this one to be selected, right? Then i would set the selected atribute only if the value out of the database is the same as the one submitted by the form: like this (omitting the surrounding html): $query= "select distinct * from sometable"; $result=mysql_query($query); // the select field is named selectfield, echo ""; echo ""; // the variable $selectfield is, if set the value submitted by the form $selectfield = $_POST["selectfield"]; while ($row=mysql_fetch_array($result)){ echo "" . $row[1] . "\n"; } echo "" echo "\n"; echo ""; i think this is a more straightforward solution for your problem... henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Newbie - PHP & MySQL
Ben Clumeck wrote: > When using MySQL to Authenticate users for a specific directory (i.e. > www.mysite.com/user) how would it know to go to that directory ("/user"). > How would it know to not let someone access a file directory in that > directory (i.e. www.mysite.com/user/page2.php)? this question is too general - you should describe your idea of what you want to do and where your problem is a bit more. In general is is you who would be responsible to write the code that checks if a user is authenticated and should have access to something, and you have to include that piece of code at the beginning of each page you want to limit access for. >If I am using MySQL to > query a row in a table can how would it know to only let a specific user(s) > have access to the information? > this either a mysql related question - as mysql deals with the problem that a user has to be authenticated within mysql_connect or mysql_pconnect to access some information - or it is a matter of your application design - if you want only special users to do something or to get some views of the data you queried from mysql you can go and create a user table with users and poasswords, and a permission table where users are designated to specific tasks, then, before you show some data in your script, you ask the user for a password, look him up in your users table, and only let him view the things he is allowed to. but, again, this is a very general answer on a general question, which might be the reason why nobody answered until now, to get some real useful answers or solutions to your problem you have to be more specific. maybe you want to go through some basic tutorials first before doing such comlicated things and learn the basics of php and mysql before playing around with big applications, permissions for users, etc... (sorry, got no URL for something lkike this at hand now, use google) hope this still helps henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] open a New Window
Simos Varelakis wrote: > Hi to everybody > > I wonder if is posiblle to open a new predefined size window (new html > page) with php code. This won't work with PHP, only with JavaScript Code which may be dynamically outputted by php, which means, you could open windows with a piece of javaScript, but you could save the size each individual user wants in a database and output the size part from there. the Javascript Code that would open a new window would be something like: window.open("datei.htm","Fenster1","width=310,height=400,left=0,top=0"); sorry, don't know a good JavaScript Reference in English or greek by now, you have to look for your own Henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Creating rich interfaces for web applications??
Geoff Caplan wrote: > Hi folks > > I have been looking for a practical way to create rich dynamic forms in the > client using PHP, and would appreciate any pointers to workable approaches. > With the launch of .Net I suspect that customer expectations are going to > change, and good old plain HTML will begin to look dated. > > I am thinking of client-side functionality such as lists that can sort and > filter, cascading dropdowns, drag and drop, validation in the client that is > double-checked on the server etc etc. I am doing quite large and complex > applications, so there is no way to code the client side stuff by hand - I > need some kind of dynamic library. > > This is for intranet use, so I will be able to specifiy the browser verion > to be used, and any plugins required. If you don't want to use HTML/CSS and are not bound to use a webbrowser, you could try to use PHP-GTK - it lets you build GUI's very quickly and easily, and works on Win and UNix machines, the Data Processing can be done in the same way you always did when coding PHP. It is in an early stage, but there are already some interesting applications, as a Mail Client and an editor. look at http://gtk.php.net and subscribe to the Mailing Lists there if you run into problems. > > There seem to be all kinds of technologies emerging, but most of them are > either too immature, too slow (such as Flash based solutions - see > www.carels.com), or are based on Java. > > For all its shorcomings, some kind of XML/DHTML solution seems best, and I > guess it will improve as Browsers catch up with CSS2. hmm, my experience with JavaScript is not much better than with Java - both are error prone, lead to browser crashes, and are slow or just don't work, if things get real comlicated and beyond "displaying a page with some text and links and rollovers". > > I have spotted a very nice Java/Tomcat solution, for example (see > isomorphic.com), which shows what can be done. But the only DHTML/PHP > library I can find is dynapi, which looks promising but is still a bit > limited so far as functionality goes and the documentation is kinda thin. aehm, above you are talking client-side, now here Java/Tomcat /PHP, it's all server side... what is your _real_ problem? Creating Lists and all that sort of things which are easily to program and maintain for developers - either client or server side, or what? Are you just looking for a library that helps you to build forms and things like that dynamically? henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Creating rich interfaces for web applications??
Geoff Caplan wrote: > Henning > > >>I did not work a lot with applications in PHP-GTK until now to say >>something about speed and reliability ( the list may answer those >>questions, i am only working on the translation of the manual for now), >>but I think it's worth a look at, and i know there are already some >>people out there who use it in a commercial environment. >> > > I think PHP-GTK is a great project, but I really do need to create the > interface on the server and send it to some kind of thin client. It might seem that I am advocating PHP-GTK too much, but even this is possible. PHP-GTK Apps would run on any X or Windows System where you have the GTK Libs and PHP compiled - nothing more needed. I am not shure but it might even be very well that these both together still use less memory than a webbrowser - in RAM and on HD or when beeing fetched over the network at boot time. When really want to write your application in PHP instead of C/C++ or maybe Java I would still consider it better than DHTML. > > I don't know if there is some kind of commercial plugin that does this and > will work with PHP. You can do forms in Flash, and they seem to be stable, > but they are much too slow. What exactly is too slow with flash? dynamical genberation with action script? You could generate your content and data with PHP and display it with flash. henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Including a file using php //
louie miranda wrote: > So u mean like this? > > > include('http://192.168.129.103/noc/chikkaps.txt'); > ?> > > > Only?, Im not good with this, can you give me some samples? do you want to include the code in that file or read the content? include is used to include code for execution, if you wanna read the content of the file you have to use the fopen and fread functions, see the manual section "filesystem functions". HTH, Henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Including a file using php //
louie miranda wrote: > Read the content > I mean, echo it on the browser.. if you send a piece of code that supposedly doesn't do what you want I can't go and read the code to find out what you _really_ want to do. if the code did what you wanted you didn't need to send it. so it is useful for people willing to help you to spend a minute to describe what you want to do, like "i want to use this piece of code to output file 'X' to the browser but it does only give me output 'Y' or error 'Z'. examples of include and fopen/fread are to be foiund in the manual at http://www.php.net/manual, use the search function to look for those words. HTH, henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] printing files
Hy, John Gurley wrote: > Just a quick question, > is there a way to echo in your php code lines of a file that you specify. > i.e. you want to output lines 1,4,7 of a certain text file use the fopen and fread functions, to read lines from a file, only put the wanted lines into a string and output this string. hth, henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem with fread
Hy, i have a question about the fread() function. i want to read data from a webserver url, which i don't know the exact size of, i only know that it varies. i see i have to give the lentgh of a file when reading it, but for remote files i have no way to check the size. And i saw no way to tell fread it should just read until the end. ok, i could set the filesize very high,. but this seems a dirty solution. on the other hand there is the fgets() function to read data "line by line" - but my data has no linbreaks, it's only serialized php variable data that comes in one line. what's the best olution for that situation? tia, henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem with fread
>$output = ""; // Clear output > $url = "http://whatever.com/file.html";; // whatever you wanna pull from > > if ($fp = fopen($url, "r")) { > while ($tmp = fget($fp, 4096)) $output .= $tmp; > fclose($fp); > } > > echo "The URL's content is: ".$output; > ?> erm, don't wanna be nosy, but you meant fgets() - forgot the "s" - didn't you? just for others who read that one... anyway, so it's safe and clean to use this one. thank you very much! henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] compiling with all options
hy all, is there an easy way to compile php with all possible extension and feature options, as far as they don't crash when used together, and, even better as far as the libs are available on the system? tia, henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php-gtk
hy leif Leif K-Brooks wrote: > I read the tutorial for it on the php-gtk site, but I didn't see a thing > about how to run it? > > this is not the list to discuss this, please subscribe to php-gtk-general. btw, afaik in the "introduction" part of the manual installation and tunning are described. please post further questions on the other list, there are lotta people who help very quick, henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php